Is there a way where I can run a program on top of all windows? Like how you can show a fom on all other windows "Ex: vbModeless, frmMain", is it possible doing in the same with the shell command?
Printable View
Is there a way where I can run a program on top of all windows? Like how you can show a fom on all other windows "Ex: vbModeless, frmMain", is it possible doing in the same with the shell command?
with the shell function you can specify the windowstyle vbnormalfocus gives the new window focus (on top), but clicking any other window will loose its focus
if you want it to be on top all the time you would need to use api, to make that window topmost
But if the window you want to be on top of is a DirectX window, like a game, then you will be better off using Dx then.
Try this if it isn't a gameCode:Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, _
ByVal hWndInsertAfter As Long, _
ByVal x As Long, _
ByVal y As Long, _
ByVal cx As Long, _
ByVal cy As Long, _
ByVal wFlags As Long) _
As Long
Private Sub Form_Load()
Call SetWindowPos(hwnd, -1, 0, 0, 0, 0, 3) '- Makes the window topmost
End Sub
But your missing the point. If its a game written with DirectX that wont do a thing. DirectX games/programs need a directx solution, not API.
Thankyou! Worked Perfectly!