Window Messages in VB
Visual Basic
3
Posts
3
Posters
0
Views
1
Watching
-
- I know is this is .NET forum but here i go anyway... Let's say i post a message to a VB form using it's HWND from a Visual C++ application. How can i get the the VB form to process/handle the message? 2) Let's say my VB form calls a DLL that performs some I/O with a serial port. How can i use a thread from the DLL or VB form to inform the user what is going on? (eg. informing them through a textbox for example that serial communication is taking place) Thanks!
-
- I know is this is .NET forum but here i go anyway... Let's say i post a message to a VB form using it's HWND from a Visual C++ application. How can i get the the VB form to process/handle the message? 2) Let's say my VB form calls a DLL that performs some I/O with a serial port. How can i use a thread from the DLL or VB form to inform the user what is going on? (eg. informing them through a textbox for example that serial communication is taking place) Thanks!
- Subclass the form. This is much easier in VB.Net than VB, but it can be done. Have a look at vbAccelerator.com for some examples;
- Use .Net or C++! ;P Seriously, threading is a nightmare in VB, but VB.Net makes it almost pleasurable.
-
- I know is this is .NET forum but here i go anyway... Let's say i post a message to a VB form using it's HWND from a Visual C++ application. How can i get the the VB form to process/handle the message? 2) Let's say my VB form calls a DLL that performs some I/O with a serial port. How can i use a thread from the DLL or VB form to inform the user what is going on? (eg. informing them through a textbox for example that serial communication is taking place) Thanks!
Hi, The answer to your second Question. From a DLL you can use API calls to inform the user whatz happening inside the DLL. Taking your example, You have a textbox for the user to see and a process takes place in the DLL. Now you can use SendMessage API call to inform the user that something is happening in the DLL. All you have to do is to pass the handle of the textbox to the DLL so that you can post message back to the textbox from the DLL using SendMessage API Ravi Shankar S Programmer Analyst iSOFT R&D Pvt Ltd Chennai, INDIA Ph: 91-44-4414980 Extn 1103