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
186 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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VBA Shell can't Find Word document 11 108
rhino JavaScript import, load 25 92
Reccomended programming language for client-server applications 12 124
Problem to line 23 53
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

790 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