|
-
Aug 27th, 2000, 04:03 PM
#1
Thread Starter
Hyperactive Member
I am trying to launch a game from my VB app, but when I do and get into the game I click anywhere on the screen and it immediately minimizes my full screen game to the taskbar. I click on the taskbar and then the game calls up and works fine, but I want to avoid this glitch. What can I do?
Thanks for all the help. I really do appreciate the help.
Using VS 6 Enterprise w/ SP5 & Windows 2000 Professional
-
Aug 27th, 2000, 04:56 PM
#2
How do you Shell the game now?
-
Aug 27th, 2000, 05:24 PM
#3
Thread Starter
Hyperactive Member
Like this:
Code:
Private Sub cmdEnter_Click()
Dim MyLaunch As String
MyLaunch = "D:\Program Files\Game\Whatever.exe"
Shell (MyLaunch)
End Sub
Thanks
Using VS 6 Enterprise w/ SP5 & Windows 2000 Professional
-
Aug 27th, 2000, 05:37 PM
#4
Hyperactive Member
Don't know if it will work but try unloading your app when you start the game, unless you still need your app running for something...
VB6.0 SP4
Windows 2000
I'm thinking of a number between
-
Aug 27th, 2000, 05:42 PM
#5
Fanatic Member
this works better than plane old shell
---------------------------------------------
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal opOperation As String, ByVal lpFile As String, ByVal opParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
' just call it like this ShellExe("Explorer")
Public Sub ShellExe(What As String)
On Error Resume Next
Call ShellExecute(0&, vbNullString, What, vbNullString, vbNullString, vbNormalFocus)
End Sub
Kurt Simons
[I know I'm a hack but my clients don't!]
-
Aug 27th, 2000, 05:44 PM
#6
Hyperactive Member
Well if ya wanna go around doing things the right way i suppose that'll work Kurt
VB6.0 SP4
Windows 2000
I'm thinking of a number between
-
Aug 27th, 2000, 05:59 PM
#7
Fanatic Member
Kurt Simons
[I know I'm a hack but my clients don't!]
-
Aug 27th, 2000, 06:04 PM
#8
Hyperactive Member
well everything i do involves crashing so i'm just guessing there might be a right way out there
VB6.0 SP4
Windows 2000
I'm thinking of a number between
-
Aug 27th, 2000, 06:33 PM
#9
Since it is an EXE file you are shelling you don't have to resort to ShellExecute. You can go with the Shell function.
Shell has a second optional argument that determents the window state. If it's omitted the Window is started minimized with focus. Since your game normally takes the full screen it will not be minimized before you take any action in the window (like clicking somewhere).
Shell the application like this instead:
Code:
Private Sub cmdEnter_Click()
Dim MyLaunch As String
MyLaunch = "D:\Program Files\Game\Whatever.exe"
Shell MyLaunch, vbMaximizedFocus
End Sub
Good luck!
-
Aug 27th, 2000, 06:33 PM
#10
Fanatic Member
someone else posted a few weeks ago that they were trying the shell a program and it kept crashing...
this fixed it
Kurt Simons
[I know I'm a hack but my clients don't!]
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
|