handshake between vb6 and vb.net prog

  • Thread starter Thread starter chad
  • Start date Start date
C

chad

i have a vb6 standalone app, and a vb.net standalone app. i want these 2
apps to notify one another (all i need is 2 flags)

is there a way to do this? i am in no mood to convert the vb6 to .net.
 
Well.. you could use the message pumps to talk back and forth between them.
This means some API calls in both your programs to intercept the inbound
messages. I was thinking you could use the window handles (hwnd) but that
still requires API work.

Otherwise, you could use flat files if you so wanted and have both of them
watch for it. Kinda cheesy, but it works and with a lot less code.
 
i have a vb6 standalone app, and a vb.net standalone app. i want these 2
apps to notify one another (all i need is 2 flags)

is there a way to do this? i am in no mood to convert the vb6 to .net.

You can use WM_COPYDATA to pass data back and forth - especially if it
is just a couple of flags. Or, you could create a custom windows
message, using RegisterWindowMessage and then use SendMessage with
HWND_BROADCAST as the hWnd. This will send the message to every
application in the system, but only applications that understand your
custom message (your vb6 app and your vb.net app) will respond.

Just a couple of thoughts. The second option is easier to implement,
because you don't have to find window handles and stuff, but I suppose
it could get you in trouble if you had multple copies of each of your
applications open...
 
Back
Top