protected virtual void OnMessage(NativeMessageArgs e)
 {
     if (Message != null)
     {
         Message(this, e);
     }
 }
        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);
            }
        }