|
-
Jun 15th, 2008, 03:42 PM
#1
Thread Starter
Fanatic Member
[RESOLVED] The Shell Command
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?
-
Jun 15th, 2008, 04:39 PM
#2
Re: 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
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
-
Jun 16th, 2008, 12:05 AM
#3
Re: The Shell Command
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.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jun 16th, 2008, 07:07 AM
#4
Re: The Shell Command
Try this if it isn't a game
Code:
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
-
Jun 16th, 2008, 01:04 PM
#5
Re: The Shell Command
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.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jun 18th, 2008, 01:06 AM
#6
Thread Starter
Fanatic Member
Re: The Shell Command
Thankyou! Worked Perfectly!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|