|
-
June 28th, 2010, 03:48 PM
#1
[RESOLVED] When a 2nd .exe. starts disable screen of first .exe
I have a .exe called menu.exe
On that screen are 2 listboxes.
When i chose from the menu to run another
program, say herman.exe, the menu.exe will keep running.
The second exe. herman.exe, will get focus.
But the two lisboxes, or the frmmenu, from menu.exe should be set
to Enabled = false,
When stopping the herman.exe then menu.exe must get the focus
and the two listboxes, or the frmmenu, should be set to Enabled = True.
Herman
-
June 28th, 2010, 04:26 PM
#2
Re: When a 2nd .exe. starts disable screen of first .exe
Sounds like you want a modal dialog. You can only do that if you write both programs as one project.
-
June 28th, 2010, 04:33 PM
#3
Re: When a 2nd .exe. starts disable screen of first .exe
Another possibilty would be to run some code in a timer to check and see if the other program is still running such as findwindow.
Always use [code][/code] tags when posting code.
-
June 29th, 2010, 12:32 PM
#4
Re: When a 2nd .exe. starts disable screen of first .exe
DataMiser,
Thanks, that was a good hint.
In the formload from menu.exe i put:
Timer1.Interval = 3000 ' Set Timer interval.
Timer1.Enabled = True
SaveSetting "HataSal", LangJaar, "AnderProgramma", "Nee"
and
Private Sub Timer1_Timer()
If GetSetting("HataSal", LangJaar, "AnderProgramma") = "Nee" Then
frmMenu.Enabled = True
End If
End Sub
Calling f.i. herman.exe from the menu i put in:
SaveSetting "HataSal", LangJaar, "AnderProgramma", "Ja"
frmMenu.Enabled = False
When clossing herman.exe i put in:
SaveSetting "HataSal", LangJaar, "AnderProgramma", "Nee"
This works fine, exept that when i run herman.exe and click on the form from menu.exe, herman.exe will be minimized.
When running herman.exe, herman.exe should always been on the foreground.
Any idea how to fix that?
Regard,
Herman
-
June 29th, 2010, 12:57 PM
#5
Re: When a 2nd .exe. starts disable screen of first .exe
You could use the always on top api
Always use [code][/code] tags when posting code.
-
June 29th, 2010, 03:06 PM
#6
Re: When a 2nd .exe. starts disable screen of first .exe
DataMiser,
Thanks. Is working as well.
Regards,
Herman
-
June 30th, 2010, 03:24 AM
#7
Re: [RESOLVED] When a 2nd .exe. starts disable screen of first .exe
Friends time... (yahoo, google, ask, answers, bing) vb6 shell and wait...
http://www.vbaccelerator.com/home/vb...on/article.asp
Good Luck
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|