|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Place app in background
Hi all,
I'm making an app that serves as a frontend to other apps, and (most of the time) when I launch the external apps from the program, they show up in the background - i.e. my frontend app is still in focus. Is there a way to cause the external app to start up in focus? Or maybe to send the frontend app to the background (not minimize)? Thanks, Gabe |
|
#2
|
|||
|
|||
|
If it's just a matter of bringing the app's window to the front, look at the zorder property of the form.
|
|
#3
|
|||
|
|||
|
U can use a win32 api called "AllowSetForegroundWindow":
This function can enables the specified process to set the foreground window using the SetForegroundWindow function. Decaration: Declare Function AllowSetForegroundWindow Lib "user32.dll" (ByVal dwProcessId As Long) As Long Parameters: ?dwProcessId [in] Specifies the identifier of the process that will be enabled to set the foreground window. If this parameter is ASFW_ANY, all processes will be enabled to set the foreground window. Return value: If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. The function will fail if the calling process cannot set the foreground window. To get extended error information, call GetLastError. Sample: If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. The function will fail if the calling process cannot set the foreground window. To get extended error information, call GetLastError. |
|
#4
|
|||
|
|||
|
Thanks guys, I'll try that out.
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > Place app in background |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|