Re: How to go Full Screen
- From: "Galen Somerville" <galen@xxxxxxxxxxxx>
- Date: Fri, 1 Sep 2006 08:50:35 -0700
Here is my final soulution to the Full Screen problem.
The "normal" maximized Window has the Title bar at the top and the Task (Start) bar at the bottom.
The "Full screen" Window occupies entire desktop.
This is the event that determines whether Full or Regular screen.
Private Sub SwFlash_FSCommand(ByVal CmdFrm As String, ByVal CmdStg As String)
Select Case CmdFrm
Case "fullscreen"
FullScr = CmdStg
Call SwitchScreens
Case Else
End Select
End Sub
This is the screen switching routine. The sizing of Frames and Flash are omitted.
Public Sub SwitchScreens()
If Not FullScr Then
SetWindowPos FindWindow("Shell_traywnd", ""), 0, 0, 0, 0, 0, 64
frmMain.WindowState = 2
Style = GetWindowLong(frmMain.hWnd, GWL_STYLE)
Call SetWindowLong(frmMain.hWnd, GWL_STYLE, Style Or WS_CAPTION)
Call DrawMenuBar(frmMain.hWnd)
resize frames, etc here
Else
SetWindowPos FindWindow("Shell_traywnd", ""), 0, 0, 0, 0, 0, 128
frmMain.WindowState = 0
Style = GetWindowLong(frmMain.hWnd, GWL_STYLE)
Call SetWindowLong(frmMain.hWnd, GWL_STYLE, Style Xor WS_CAPTION)
Call DrawMenuBar(frmMain.hWnd)
frmMain.Move 0, 0, Screen.Width, Screen.Height
resize frames, etc here
End If
End Sub
These are the declarations.
Private Declare Function GetWindowLong Lib "USER32" Alias "GetWindowLongA" (ByVal hWnd As Long, _
ByVal nIndex As Long) As Long
Private Declare Function SetWindowLong Lib "USER32" Alias "SetWindowLongA" (ByVal hWnd As Long, _
ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Declare Function DrawMenuBar Lib "USER32" (ByVal hWnd As Long) As Long
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 Declare Function FindWindow Lib "USER32" Alias "FindWindowA" (ByVal lpClassName As String, _
ByVal lpWindowName As String) As Long
Const WS_CAPTION = &HC00000
Galen
.
- Follow-Ups:
- Re: How to go Full Screen
- From: Sneha Menon
- Re: How to go Full Screen
- Prev by Date: Open File
- Next by Date: Re: Open File
- Previous by thread: Open File
- Next by thread: Re: How to go Full Screen
- Index(es):
Relevant Pages
|