Microsoft.Win32.SystemEvents.SessionEnding += new Microsoft.Win32.SessionEndingEventHandler(SystemEvents_SessionEnding);
        protected override void WndProc(ref Message m)
        {
            const int WM_QUERYENDSESSION = 0x011;
            const int WM_ENDSESSION = 0x16;

            if (m.Msg == WM_QUERYENDSESSION)
            {

            }
            else if (m.Msg == WM_ENDSESSION)
            {

            }
            base.WndProc(ref m);
        }
this.FormClosing += new FormClosingEventHandler(frmMain_FormClosing);

 

相关文章:

  • 2022-12-23
  • 2021-10-28
  • 2022-12-23
  • 2021-06-14
  • 2021-10-25
  • 2022-12-23
  • 2021-07-12
  • 2022-02-11
猜你喜欢
  • 2022-01-29
  • 2022-02-24
  • 2022-12-23
相关资源
相似解决方案