Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Window Messages in VB

Window Messages in VB

Scheduled Pinned Locked Moved Visual Basic
questionc++csharptutorial
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Renegade 0
    wrote on last edited by
    #1
    1. 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!
    Richard DeemingR R 2 Replies Last reply
    0
    • R Renegade 0
      1. 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!
      Richard DeemingR Offline
      Richard DeemingR Offline
      Richard Deeming
      wrote on last edited by
      #2
      1. 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;
      2. Use .Net or C++! ;P Seriously, threading is a nightmare in VB, but VB.Net makes it almost pleasurable.

      "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

      1 Reply Last reply
      0
      • R Renegade 0
        1. 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!
        R Offline
        R Offline
        Ravi_Shankar
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups