How do i open another program when other program is opening.
ie. when I double click on a program call "example.exe", "example2.exe" have to open automatically.:( :(
Printable View
How do i open another program when other program is opening.
ie. when I double click on a program call "example.exe", "example2.exe" have to open automatically.:( :(
should work.:)Code:shell "programname.exe"
You can even add
Code:
myInt = Shell "c:\Program2.exe", vbNormalFocus
'This will open the new program in front, not minimized or in any other state, and make myInt 1 if the program loads, and 0 if it fails.
not that command.
ie. i have a program that all ready compiled to example.exe and i want to make another new program, if I double click on the example.exe my new program have to open.
how do i do it..:(
ie. I want to open a program call microsoft word. i want to make a new program if i double click on microsoft word.exe and then a message box have to appear from my new program and say "Welcome".:(
How do i do it????
As everyone has said. You compile your EXE to be called whatever. Your code would read as follows.
VB Code:
msgbox "Hello and welcome to my program",vbokonly,"Hi" shell "c:\program files\microsoft office\winword.exe",vbnormal
not like that. if microsoft word opens, my program have to open tooo.:( :(
You are Canadian and yet.. U dont speak English ?? :)Quote:
ie. I want to open a program call microsoft word. i want to make a new program if i double click on microsoft word.exe and then a message box have to appear from my new program and say "Welcome".
What people have given you is what you asked for in your statement above.
Anyway, never mind.
What you have to do is run your program in the background with a timer set to monitor all open windows.
When your program finds the handle of Micorosft Word, it can then intercept and do what you want it to do.
Search for help on using the findWindow or look at my post to Zero_Flaw and use the code. All you have to do is find what handle MS word uses.
Mega.