|
-
May 2nd, 2001, 12:38 PM
#1
Thread Starter
Member
Always on Top
How do i get my program fullscreen and on top of the startmenu?? (without useing directx)
-
May 2nd, 2001, 01:25 PM
#2
Frenzied Member
Code:
Const HWND_TOPMOST = -1
Const HWND_NOTOPMOST = -2
Const SWP_NOSIZE = &H1
Const SWP_NOMOVE = &H2
Const SWP_NOACTIVATE = &H10
Const SWP_SHOWWINDOW = &H40
Private Declare Sub 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)
Private Sub Form_Activate()
'Set the window position to topmost
SetWindowPos Me.hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOACTIVATE Or SWP_SHOWWINDOW Or SWP_NOMOVE Or SWP_NOSIZE
End Sub
-
May 2nd, 2001, 04:59 PM
#3
You can shorten your code down to:
Code:
Private Declare Sub 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)
Private Sub Form_Activate()
'Set the window position to topmost
SetWindowPos Me.hWnd, -1, 0, 0, 0, 0, 3
End Sub
-
May 2nd, 2001, 05:02 PM
#4
I'm not sure with regard to full screen apps, but what you could do is set the BorderStyle to 0-None and set the WindowState to 2-Maximized.
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
|