protected override void WndProc(ref Message m) { if (m.Msg == 0x00A3) //disable maximize on doubleclick { m.Result = IntPtr.Zero; return; } if (m.Msg == 0x0084 /*WM_NCHITTEST*/) { m.Result = (IntPtr)2; //HTCLIENT return; } switch (m.Msg) { case MessageHelper.WM_USER: MessageBox.Show("Message recieved: " + m.WParam + " - " + m.LParam); break; case MessageHelper.WM_COPYDATA: MessageHelper.COPYDATASTRUCT mystr = new MessageHelper.COPYDATASTRUCT(); Type mytype = mystr.GetType(); mystr = (MessageHelper.COPYDATASTRUCT)m.GetLParam(mytype); viribot.Say(mystr.lpData); break; } base.WndProc(ref m); }
protected override void WndProc(ref Message m) { switch (m.Msg) { case MessageHelper.WM_COPYDATA: MessageHelper.COPYDATASTRUCT copyDataStruct = new MessageHelper.COPYDATASTRUCT(); Type copyDataType = copyDataStruct.GetType(); copyDataStruct = (MessageHelper.COPYDATASTRUCT)m.GetLParam(copyDataType); if (copyDataStruct.lpData.Equals("ProfilesImported")) { RefreshAll(); } break; } base.WndProc(ref m); }