Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 194
  • Last Modified:

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
0
BIAPRO
Asked:
BIAPRO
  • 3
  • 2
1 Solution
 
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
 
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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
 
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

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now