2 VB6 PROGRAMS RUNNING AT SAME TIME, THEN FORCE THAT WHEN A CERTAIN VARIABLE IS CHANGED IN PROGRAM (A) IT CHANGES ALSO IN PROGRAM (B)

In program (a) e.g.  txtmemberid.txt   changes, then  in program (b)  the txtmemberupd.txt has to change by itself to same value
BIAPROAsked:
Who is Participating?
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
Sounds like a good candidate for DDE...it's an old technology but it's still supported and it works:
http://www.planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=34285&lngWId=1


0
 
c0ldfyr3Commented:
Your question is extremely vague, can you elaborate a little please?

For a start, how are txtmemberid and txtmemberupdt.txt accessed by the two applications??
0
 
BIAPROAuthor Commented:
ok,  in program (a)  txtmemberId.text  will get e.g. value  JACK001  this will show name, adres etc from database,
in program (b)  also active on screen exist a box  txtmemberUpd.text,  as soon the valid code JACK001 is entered at progam (A) form
now I have to copy/paste this JACK001 to the program (B) textbox, so this program will start a certain job on this value.
I was wondering if possible that program (B) can "see" the other program text box or label .
Now I know I could build a sub to write this value to text.file in program (A) , then a timer in (B) to watch, but doing this on
server will put a heavy load on the network
So in the "old" days (compiler basic/dos) I could poke and peek a memory location to "stuff"  this value,  
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
c0ldfyr3Commented:
Ok I see what you want to do now, the easiest way to do this is during Form_Load on the form in program (b) save the txtmemberUpd.hWnd to the registry or an ini file, then when the text changes in txtmemberid use SendMessage WM_SETTEXT on the other text box using the value you loaded from the ini/registry. Do you understand?
0
 
BIAPROAuthor Commented:
great!  Thanks!
0
 
BIAPROAuthor Commented:
this works very good, even better then in the old days, very usefull for even more things then I was looking for
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.