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
182 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 85

Accepted Solution

by:
Mike Tomlinson earned 500 total points
Comment Utility
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
Comment Utility
great!  Thanks!
0
 

Author Comment

by:BIAPRO
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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.
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This video teaches viewers about errors in exception handling.

762 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now