How to use PostMessage in C#?

  • Thread starter Thread starter Jan Odvárko
  • Start date Start date
J

Jan Odvárko

Hi All,
Is there any chance to post a custom message to an application message queue
and handle it then?

Do I have to import the PostMessage API function by [DllImport]? But, in
such a case I would
have to register new mesasge id, rigth? Is there easier way to do that?

thanks for all tips!

cheers

Honza
 
What do you want to do? If you want to call a method after the current one
finishes use Control.BeginInvoke. If you want ot post a real windows message
then you have to use P\Invoke

HTH
B\rgds
100
 
Yeah, BeginInvoke is the right way...

thanks!

Honza


100 said:
What do you want to do? If you want to call a method after the current one
finishes use Control.BeginInvoke. If you want ot post a real windows message
then you have to use P\Invoke

HTH
B\rgds
100
Jan Odvárko said:
Hi All,
Is there any chance to post a custom message to an application message queue
and handle it then?

Do I have to import the PostMessage API function by [DllImport]? But, in
such a case I would
have to register new mesasge id, rigth? Is there easier way to do that?

thanks for all tips!

cheers

Honza
 
Back
Top