473,322 Members | 1,614 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

post message to other thread in net

how , can i post message to other thread in net ?
is there somthing with net that i can do ?
or i need 2 use win32 api's ?
Nov 15 '05 #1
4 5368
Seems that the Win32 API is the only choice. But I can confirm it works
pretty well in .NET.

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

"Daylor" <ro******@hotmail.com> wrote in message
news:bs**********@news2.netvision.net.il...
how , can i post message to other thread in net ?
is there somthing with net that i can do ?
or i need 2 use win32 api's ?


Nov 15 '05 #2
if im using a form on the reciving thread.
u recommend to use the OnNotifyMessage event of the form
and postmessage from the sender thread , or there is a nicer way ?
"Dmitriy Lapshin [C# / .NET MVP]" <x-****@no-spam-please.hotpop.com> wrote
in message news:uC**************@TK2MSFTNGP10.phx.gbl...
Seems that the Win32 API is the only choice. But I can confirm it works
pretty well in .NET.

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

"Daylor" <ro******@hotmail.com> wrote in message
news:bs**********@news2.netvision.net.il...
how , can i post message to other thread in net ?
is there somthing with net that i can do ?
or i need 2 use win32 api's ?

Nov 15 '05 #3
Assuming you have a reference to the form, just call a method or set a
property that the thread method looks for on each loop. This property could
be a bool, int, struct, class, etc.

--
William Stacey, MVP

"Daylor" <ro******@hotmail.com> wrote in message
news:bs**********@news2.netvision.net.il...
if im using a form on the reciving thread.
u recommend to use the OnNotifyMessage event of the form
and postmessage from the sender thread , or there is a nicer way ?
"Dmitriy Lapshin [C# / .NET MVP]" <x-****@no-spam-please.hotpop.com> wrote
in message news:uC**************@TK2MSFTNGP10.phx.gbl...
Seems that the Win32 API is the only choice. But I can confirm it works
pretty well in .NET.

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

"Daylor" <ro******@hotmail.com> wrote in message
news:bs**********@news2.netvision.net.il...
how , can i post message to other thread in net ?
is there somthing with net that i can do ?
or i need 2 use win32 api's ?


Nov 15 '05 #4
Daylor,

If you are posting to the thread, and not to a specific window, then you
will have to have something that implements the IMessageFilter interface,
and then pass that implementation to the static AddMessageFilter method on
the Application class, so it can handle the message that comes in on the
thread.

From the other thread, you will have to use the PostThreadMessage API
method through the P/Invoke layer.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Daylor" <ro******@hotmail.com> wrote in message
news:bs**********@news2.netvision.net.il...
if im using a form on the reciving thread.
u recommend to use the OnNotifyMessage event of the form
and postmessage from the sender thread , or there is a nicer way ?
"Dmitriy Lapshin [C# / .NET MVP]" <x-****@no-spam-please.hotpop.com> wrote
in message news:uC**************@TK2MSFTNGP10.phx.gbl...
Seems that the Win32 API is the only choice. But I can confirm it works
pretty well in .NET.

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

"Daylor" <ro******@hotmail.com> wrote in message
news:bs**********@news2.netvision.net.il...
how , can i post message to other thread in net ?
is there somthing with net that i can do ?
or i need 2 use win32 api's ?


Nov 15 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Ziaran _ | last post by:
I have written a new debugger. I think people will find it useful. Where can I post it for people to download? Thanks, Nir _________________________________________________________________...
0
by: Andreas Suurkuusk | last post by:
Hi, I just noticed your post in the "C# memory problem: no end for our problem?" thread. In the post you implied that I do not how the garbage collector works and that I mislead people. Since...
3
by: Daylor | last post by:
how , can i post message to other thread in net ? is there somthing with net that i can do ? or i need 2 use win32 api's ?
5
by: Daylor | last post by:
how , can i post message to other thread in net ? is there somthing with net that i can do ? or i need 2 use win32 api's ?
0
by: BergRD | last post by:
For some odd reason my original post was double posted then removed from the forums. Odd happenings but wanted to re-post incase no one saw the original, thanks :D > Salutations! > > New to...
24
by: moriman | last post by:
Hi, The script below *used* to work. I have only just set up a server, PHP etc again on my Win98 system and now it doesn't? On first loading this page, you would have $p = and the button...
9
by: c676228 | last post by:
Hi, I am new to this discussion forum. I started to post questions on this forum since this Jan. and got many good responses and I am very appreciated to those who are willing to help with their...
2
by: Phlip | last post by:
Newsgroupies: One myth about USENET is that each group has a charter; some "official" list of on-topic concepts. When a post arrives "violating" this myth, the replies that support the myth can...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.