What I'm trying to do is send a WIN32 message using
[DllImport("user32")]
public static extern bool PostMessage(IntPtr hwnd, int msg, IntPtr wparam, IntPtr lparam);
and receive it in my static Program class, where I have the main()
method.
I know that in a form it can be received by protected override void WndProc(ref Message m)
, but I do not know how to do it (or if it can be done) in a normal class.