Example #1
0
        protected override void WndProc(ref Message m)
        {
            bool flag = true;

            switch (m.Msg)
            {
            case 0x7b:
            {
                Point pointFromLPARAM = Win32Util.GetPointFromLPARAM((int)m.LParam);
                pointFromLPARAM = base.PointToClient(pointFromLPARAM);
                this.contextMenu1.Show(this, pointFromLPARAM);
                break;
            }

            case 0x31a:
                if (this.m_htheme != IntPtr.Zero)
                {
                    XPTheme.CloseThemeData(this.m_htheme);
                    this.m_htheme = IntPtr.Zero;
                }
                base.Invalidate();
                break;
            }
            if (flag)
            {
                base.WndProc(ref m);
            }
        }
Example #2
0
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         base.KeyPress -= new KeyPressEventHandler(this.KeyPressed);
         if (this.m_htheme != IntPtr.Zero)
         {
             XPTheme.CloseThemeData(this.m_htheme);
         }
         if (this.components != null)
         {
             this.components.Dispose();
         }
     }
     base.Dispose(disposing);
 }