How can I get a specific message on a specific method?
I’ve seen some examples and people use ‘ref’ ,but I dont understand it.
In delphi,for example,my function(method) must be declared in the Main Form class and next to the declaration I have to put the message
type TForm1 = class(TForm) ... protected procedure MessageHandler(var Msg:Tmessage);Message WM_WINSOCK_ASYNC_MSG; end;
I need this in C# so I can use WSAAsyncSelect in my application
Check >my other Question< with bounty 550 reputation to understand what I mean
In .NET winforms, all messages go to
WndProc, so you can override that:If I have misunderstood, please say – but I think you would do well to avoid this low-level approach, and describe what you want to achieve – i.e. it might be that
.Invoke/.BeginInvokeare more appropriate.