473,396 Members | 1,766 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,396 software developers and data experts.

PostMessage Equivalent in .NET

108 100+
Hello guys,

I'm very new in .NET development and I was forced to learn it since my current project should used it. Anyway can you help me guys if you know the equivalent of PostMessage in .NET. Please give me an example code snippet.

Thanks in advance.
Sep 14 '07 #1
3 2915
Plater
7,872 Expert 4TB
Take a look at the "Message" class.
It relates to the message pump you might be used to in c++ GUIs.
(Although it's not that common to have to directly manipulate message pumps in .NET apps)
Sep 14 '07 #2
romcab
108 100+
Take a look at the "Message" class.
It relates to the message pump you might be used to in c++ GUIs.
(Although it's not that common to have to directly manipulate message pumps in .NET apps)
hi pal..

Thanks for your help. I will take a look at that. Anyway, hope you can give a comment with this other Borland types.

PostMessage
GetMessage
OpenEvent
SetEvent
CreateEvent
WaitForSingleObject
PostThreadMessage

Thanks in advance.
Sep 17 '07 #3
Plater
7,872 Expert 4TB
You don't have to micro-manage your GUI events through the messagepump anymore. There is an automated system (eventhandlers) to do them for you.

If you want to see what I'm talking about, open up the designer and drag a button and a textbox onto your form.
Double-click the button and it will automatically take you to a function it created to handle the button-click event. Anything you put in that function will be run when the button is clicked.
Each control has a number of events you can assign too. The textbox will probably auto-create a "ontextchange" event for you.

You can then choose to view the designer code from the project explorer, and see how it created it.
(Something roughly like button1.Click += new ClickEvent(button1_click);)


I think your last two where threading related?
Find the "Thread" object and look at it's various properties

PostMessage
GetMessage
OpenEvent
SetEvent
CreateEvent
WaitForSingleObject
PostThreadMessage
Sep 17 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Paul | last post by:
Hi all. Probably a quick one, I'm using PostMessage to send keys to an applicatoin but how do I convert the key string to a long values so that I can pass this to the wParam. The definition is...
1
by: Harry Whitehouse | last post by:
I have a form which, when launched, automatically begins a fairly intensive process. The problem is that the process is so intensive that the form doesn't have time to draw itself -- it only...
15
by: James | last post by:
In my code I have a problem in abtaining a windows handle. I do not know the namespace to obtain the windows hanle. here is the code. using System; using System.Collections; using...
12
by: Wilfried Mestdagh | last post by:
Hi, Using P/Invoke I use PostMessage to send a message from one thread to another. I'm pretty sure this has already worked in dotnet. but I've upgraded version 2 few day ago. Now I have an...
2
by: Lenster | last post by:
When using PostMessage to post myself a message, the msg and wparam parameters somehow get swapped over. They are in the correct order when calling PostMessage but by the time wndproc handles the...
3
by: Max M. Power | last post by:
When I use the SendMessage API I can sucessfully send and receive a user defined message. When I use the PostMessage API I can NOT sucessfully send and receive the same user defined message. ...
3
by: knikkix | last post by:
Hi, I created a form in VB.Net with only one button. This is the code in button click event Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles...
10
by: Sergei | last post by:
Can anyone explain why PostMessage to a Windows Form is considered unsafe and raises InvalidOperationException? I can get rid of that setting CheckForIllegalCrossThreadCalls to false and...
21
by: one2001boy | last post by:
PostMessage() function returns ERROR_NOT_ENOUGH_QUOTA after running in a loop for 700 times, but the disk space and memory are still big enough. any suggestion to resolve this problem? thanks.
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.