ega061397
asked on
GetModuleUsage
I have written a program in VB3 and I need to port it to 32 bits. The only problem I have is that the GetModuleUsage 16 bits api function I did use to "modal" run an external program has gone in the 32 bits api. I need to know how to accomplish this task using the 32 bits api and VB4.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I think I was not very clear to redact my question. I need not only to run a second program, but to wait for it to finnish. And to do it using the VB4 32 bit compiler. I already have done this with the 16 bin Windows API but the GetModuleUsage function is gone in the 32 bit Windows API.
Is the second program a DOS program? Will it be opening a DOS window?
ASKER
No, the second program is a Windows program and it wont open any dos box.
Is the second program a DOS program? Does it open a DOS window?
L8r,
Chizl
L8r,
Chizl
Also does the second program close out completely when finished if so you can do the following..
Declare Function FindWindow Lib "user32.dll" _
(ByVal lpclassname As Any, _
ByVal lpwindowname As Any) _
As Integer
Function CallProgram()
cText = "Window Caption of second program"
call Shell("The_second_program. exe",0)
Wait 5 ' give the program enough time to initialize
Do While FindWindow(0&, cText) <> Null
DoEvents
Loop
end function
Function Wait(nSec As Integer)
Start = Timer
Do While Timer < Start + nSec
DoEvents
Loop
End Function
Declare Function FindWindow Lib "user32.dll" _
(ByVal lpclassname As Any, _
ByVal lpwindowname As Any) _
As Integer
Function CallProgram()
cText = "Window Caption of second program"
call Shell("The_second_program.
Wait 5 ' give the program enough time to initialize
Do While FindWindow(0&, cText) <> Null
DoEvents
Loop
end function
Function Wait(nSec As Integer)
Start = Timer
Do While Timer < Start + nSec
DoEvents
Loop
End Function
Please change the :
call Shell("The_second_program. exe",0)
To :
call Shell("The_second_program. exe",2)
The "0" would make the program not show up on screen.:)
call Shell("The_second_program.
To :
call Shell("The_second_program.
The "0" would make the program not show up on screen.:)
ASKER
excelent Chizl
thanks a lot !!!!
thanks a lot !!!!
ASKER