Desktop Functions: Smart Device Functions:
|
SHFullScreen (aygshell)
aygshell is for smart devices, not desktop Windows. Therefore, this information only applies to code using the .NET Compact Framework. To see if information for SHFullScreen in other DLLs exists, click on Find References to the right. C# Signature:
[DllImport("aygshell.dll")] [DllImport("aygshell.dll")] static extern uint SHFullScreen(IntPtr hwndRequester, uint dwState); VB Signature:
<DllImport("aygshell.dll", SetLastError:=True)> _ <DllImport "aygshell.dll", SetLastError:=True)> _ Public Shared Function SHFullScreen( hWnd as IntPtr, flags as Integer ) as Integer End Function User-Defined Types:C# Constants:Constants:const uint SHFS_SHOWTASKBAR = 0x0001; const uint SHFS_HIDETASKBAR = 0x0002; const uint SHFS_SHOWSIPBUTTON = 0x0004; const uint SHFS_HIDESIPBUTTON = 0x0008; const uint SHFS_SHOWSTARTICON = 0x0010; const uint SHFS_HIDESTARTICON = 0x0020; VB Constants:Const SHFS_SHOWTASKBAR As UInteger = &H1 Const SHFS_HIDETASKBAR As UInteger = &H2 Const SHFS_SHOWSIPBUTTON As UInteger = &H4 Const SHFS_HIDESIPBUTTON As UInteger = &H8 Const SHFS_SHOWSTARTICON As UInteger = &H10 Const SHFS_HIDESTARTICON As UInteger = &H20 Notes:SHFS_SHOWTASKBAR Return the taskbar to its topmost state. SHFS_HIDETASKBAR Put the taskbar at the bottom of the z-order. Note that a game or an application that requires take-over of the entire screen may use this flag. It is the responsibility of the application to make sure it is sized FULL SCREEN before using this flag. Otherwise, it will appear as though the function did nothing. SHFS_SHOWSIPBUTTON Return the Input Panel button to its visible state. SHFS_HIDESIPBUTTON Hide the Input Panel button. SHFS_SHOWSTARTICON Return the Start button icon to the navigation bar. SHFS_HIDESTARTICON Hide the Start button icon on the navigation bar. When the Start icon is hidden, the shell is in a special state in which clicking or tapping the navigation bar will not display the drop-down Start menu. The navigation bar is essentially disabled when in this state. While in this mode, WM_LBUTTONDOWN and WM_LBUTTONUP messages will be forwarded to hwndRequester. This allows an application to drop out of this mode by calling this function with the SHFS_SHOWSTARTICON, when the user clicks or taps the navigation bar. Tips & Tricks:Take into account that this function is glitchy, at best. If you have a single form application it's OK, but if your application is multi-form, or launches other processes you can see the taskbar briefly, showing an undesirable flickering effect. Important Note: This function only works for Pocket PC, not Windows CE. Update. Microsoft's SHFullScreen definition at http://msdn.microsoft.com/en-us/library/aa453694.aspx states that SHFS_SHOWTASKBAR and SHFS_HIDETASKBAR can be used with Windows CE, but remaining State flags pertaining to the SIP and Start Icons are only relevant in Pocket PC. Sample Code:const uint SHFS_SHOWTASKBAR = 0x0001; const uint SHFS_HIDETASKBAR = 0x0002; const uint SHFS_SHOWSIPBUTTON = 0x0004; const uint SHFS_HIDESIPBUTTON = 0x0008; const uint SHFS_SHOWSTARTICON = 0x0010; const uint SHFS_HIDESTARTICON = 0x0020; [DllImport("aygshell.dll")] static extern bool SHFullScreen(IntPtr hwndRequester, uint dwState); [DllImport("coredll.dll")] public static extern IntPtr GetCapture(); private bool TaskBarOnOff(bool OnOff) {
Capture = true; } Alternative Managed API:Functions for doing the same uses without using SHFullScreen: http://www.codeproject.com/ce/fullscreen.asp Alternate Method for making Full Screen application without using DLL'sSet your form's FormBorderStyle to None ,set WindowState to Normal and TopMost to True and add the following in your form initialization
this.Height = Screen.PrimaryScreen.Bounds.Height; Please edit this page!Do you have...
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more). |
|