SayHiForm.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. using System;
  2. using System.Diagnostics;
  3. using System.Windows.Forms;
  4. namespace HelloNppPluginDockWindow
  5. {
  6. public partial class SayHiForm : Form
  7. {
  8. public SayHiForm()
  9. {
  10. InitializeComponent();
  11. }
  12. protected override void OnHandleCreated(EventArgs e)
  13. {
  14. base.OnHandleCreated(e);
  15. textBox1.Text = Handle.ToInt64().ToString("X8");
  16. }
  17. private void SayHiForm_Shown(object sender, System.EventArgs e)
  18. {
  19. Debug.WriteLine($"{nameof(SayHiForm)}#{Handle.ToInt32():X8} {nameof(Shown)}");
  20. }
  21. private void SayHiForm_FormClosing(object sender, FormClosingEventArgs e)
  22. {
  23. Debug.WriteLine($"{nameof(SayHiForm)}#{Handle.ToInt32():X8} {nameof(FormClosing)}");
  24. }
  25. private void SayHiForm_FormClosed(object sender, FormClosedEventArgs e)
  26. {
  27. Debug.WriteLine($"{nameof(SayHiForm)}#{Handle.ToInt32():X8} {nameof(FormClosed)}");
  28. }
  29. private void SayHiForm_ParentChanged(object sender, System.EventArgs e)
  30. {
  31. Debug.WriteLine($"{nameof(SayHiForm)}#{Handle.ToInt32():X8} {nameof(ParentChanged)}");
  32. }
  33. }
  34. }