Link to home
Start Free TrialLog in
Avatar of Smout
Smout

asked on

Send variable to other program

How can I send a global variable from one vb program to another (not by using the sendkeys nor by a file) ?
Avatar of thew00d
thew00d
Flag of United Kingdom of Great Britain and Northern Ireland image

I've done it using DDE before but its a pretty outdated way of doing things now that we have OLE.  Or you could use a registry setting but I suppose thats pretty close to using a file.

Thats my 2 cents
Avatar of jdunck
jdunck

Is the 2nd VB program an EXE or DLL?
Avatar of Smout

ASKER

an exe
Can you be certain that the second program will be running?
And is the 2nd program an ActiveX EXE?
An ole server perhaps
ASKER CERTIFIED SOLUTION
Avatar of BGillham
BGillham

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
the program is already running
If the @nd Program is written by you, you can add a public class and populate the as many variables as you want by setting the properties of that class.
I have had pretty good success using a DLL to pass variables from one application to another.  You would have to be able to rewrite both applications to incorporate the use of a dll.  If this is a possibility, I can get more specific.
i agree with BGillham, store it in the registry or make a link between applications
can't use registry and linking gives me troubles when I update the program in the future