BaseForm.cs 949 B

12345678910111213141516171819202122232425262728293031323334353637
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;
  9. namespace UAS_MES_NEW.CustomControl.BaseForm
  10. {
  11. public partial class BaseForm : Form
  12. {
  13. public BaseForm()
  14. {
  15. InitializeComponent();
  16. }
  17. private void BaseForm_Load(object sender, EventArgs e)
  18. {
  19. if (!DesignMode)
  20. {
  21. Main main = Application.OpenForms["Main"] as Main;
  22. main.TopMost = false;
  23. }
  24. }
  25. private void BaseForm_FormClosing(object sender, FormClosingEventArgs e)
  26. {
  27. if (!DesignMode)
  28. {
  29. //Main main = Application.OpenForms["Main"] as Main;
  30. //main.TopMost = (main.Controls["headBar1"].Controls["AlwaysTop"] as CheckBox).Checked;
  31. }
  32. }
  33. }
  34. }