示例#1
0
 protected virtual void OnMessage(NativeMessageArgs e)
 {
     if (Message != null)
     {
         Message(this, e);
     }
 }
示例#2
0
        protected override void WndProc(ref Message m)
        {
            try
            {
                NativeMessageArgs e = new NativeMessageArgs();
                e.Message = m;
                e.Cancel  = false;

                OnMessage(e);

                if (!e.Cancel)
                {
                    base.WndProc(ref m);
                }
            }
            catch (Exception x)
            {
                Console.WriteLine(x.Message);
            }
        }