|
-
Feb 6th, 2005, 04:24 PM
#1
Thread Starter
Lively Member
Forcing a Window to minimize
Hello,
I'm currently having problems making a DirectX game window minimise. I can make it maximise but not minimise . I've seen it done before so I know it's possible. I had a brief moment of success by making the window maximise and then minimise but it's not reliable as it hardly ever works......
Please help
-
Feb 6th, 2005, 04:31 PM
#2
Re: Forcing a Window to minimize
Most DirectX games are made to run in full screen mode only. They do not run in windowed mode, unless they were made that way, in which case they don't run in full-screen mode. I don't think you CAN minimize a full-screen app. Sorry.
-
Feb 6th, 2005, 04:45 PM
#3
Thread Starter
Lively Member
Re: Forcing a Window to minimize
I know you can :P. If you press Alt-Tab on this game you can make hotkeys for your programme to work. I can maximise but the minimise doesn't work....
-
Feb 7th, 2005, 04:05 AM
#4
Frenzied Member
Re: Forcing a Window to minimize
Me.WindowState = vbMinimized ?
-
Feb 7th, 2005, 06:24 AM
#5
Thread Starter
Lively Member
Re: Forcing a Window to minimize
 Originally Posted by dis1411
Me.WindowState = vbMinimized ?
It isn't me and it's a fullscreen directX app
-
Feb 8th, 2005, 07:12 AM
#6
Re: Forcing a Window to minimize
Try this:
VB Code:
Option Explicit
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, _
ByVal nCmdShow As Long) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" _
(ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Const SW_MINIMIZE = 6
Private Sub Command1_Click()
Dim lHandle As Long
lHandle = FindWindow(vbNullString, "Caption Of Window To Be Minimized")
If lHandle = 0 Then Exit Sub
Call ShowWindow(lHandle, SW_MINIMIZE)
End Sub
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
|