Process ProgramDisplay()
Posted: Tue Apr 23, 2013 2:00 am
I would like to be able to RunProgram(An.exe,#PB_Program_Hide), if necessary change it's screen location, then un-hide it.
http://www.purebasic.com
https://www.purebasic.fr/english/
Code: Select all
Procedure UnHideWindow(hwnd,*cTitle)
Protected cTitle.s{128}
Protected bContinue = #True
SendMessage_(hwnd,#WM_GETTEXT,128,@cTitle)
If Len(cTitle) And cTitle = PeekS(*cTitle)
ShowWindow(hWnd,#SW_SHOW)
bContinue = #False
EndIf
ProcedureReturn bContinue
EndProcedure
hProgram = RunProgram("notepad.exe","","c:\temp",#PB_Program_Open|#PB_Program_Hide)
Delay(100) ; Needed to allow notepad to open it's window
EnumWindows_(@UnHideWindow(),@"Untitled - Notepad")
While ProgramRunning(hProgram)
Delay(10)
Wend