Solved

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)

Posted on 2008-10-10
6
184 Views
Last Modified: 2012-05-05
In program (a) e.g.  txtmemberid.txt   changes, then  in program (b)  the txtmemberupd.txt has to change by itself to same value
0
Comment
Question by:BIAPRO
  • 3
  • 2
6 Comments
 
LVL 10

Expert Comment

by:c0ldfyr3
ID: 22686292
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
 

Author Comment

by:BIAPRO
ID: 22686386
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
 
LVL 10

Expert Comment

by:c0ldfyr3
ID: 22686853
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
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 
LVL 85

Accepted Solution

by:
Mike Tomlinson earned 500 total points
ID: 22688021
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
 

Author Closing Comment

by:BIAPRO
ID: 31504986
great!  Thanks!
0
 

Author Comment

by:BIAPRO
ID: 22690897
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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.
This video teaches viewers about errors in exception handling.

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question