Re: How to go Full Screen
- From: "Galen Somerville" <galen@xxxxxxxxxxxx>
- Date: Fri, 1 Sep 2006 10:24:17 -0700
My program interfaces a Flash.swf program and a USB device. There is no GUI per se. Just a Frame
that hosts the Flash.swf.
Show me the 5 lines of code and I'll try it.
Galen
"Sneha Menon" <spiderangelo@xxxxxxxxx> wrote in message
news:1157130212.414165.219260@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi Galenbottom.
I am wondering Why!!!
Full Screen is child's play with 5 lines of code
Has using API became a fad?
Sneha
------------------------------------------------------------------------------------------------
Galen Somerville wrote:
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
_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,
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
String, _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
ByVal lpWindowName As String) As Long
Const WS_CAPTION = &HC00000
Galen
.
- References:
- Re: How to go Full Screen
- From: Galen Somerville
- Re: How to go Full Screen
- From: Sneha Menon
- Re: How to go Full Screen
- Prev by Date: Re: Can I store Date and Time in long integer?
- Next by Date: Re: Open File
- Previous by thread: Re: How to go Full Screen
- Index(es):
Relevant Pages
|