如何在紧凑的框架中隐藏标题栏
问题描述:
我正在Windows移动项目中工作.由于某些项目要求,我需要隐藏表单的标题栏,但没有找到表单的任何属性.
任何建议将不胜感激.
在此先感谢
I am working in a Windows mobile project. Due to some project requirement I need to Hide the form''s tittle bar, but didn''t find any properties of the form to do so.
Any suggestion would be appreciated.
Thanks in advance
答
在窗体的Windows移动属性上,您可以选择要最大化的窗体状态.也有dll导入,可用于隐藏开始"图标和"SIP按钮".
下面是我用来隐藏任务栏和SIP按钮的代码
On the windows mobile properties for the form, you can select the Form State to be maximized. There are also dll imports you can use to hide the Start Icon and SIP Buttons.
Below is the code I use to hide the Taskbar and SIP Buttons
#region SHFullscreen
#region FullScreen Imports
[DllImport("AYGShell.dll")]
private static extern Int32 SHFullScreen(IntPtr hwndRequester, UInt32 dwState);
public const UInt32 SHFS_SHOWTASKBAR = 0x0001;
public const UInt32 SHFS_HIDETASKBAR = 0x0002;
public const UInt32 SHFS_SHOWSIPBUTTON = 0x0004;
public const UInt32 SHFS_HIDESIPBUTTON = 0x0008;
public const UInt32 SHFS_SHOWSTARTICON = 0x0010;
public const UInt32 SHFS_HIDESTARTICON = 0x0020;
#endregion
/// <summary>
/// Call this method to set the form to full screen
/// (This makes it a little harder to go back to the desktop)
/// </summary>
private void SetFullScreen()
{
#region FullScreen
WindowState = FormWindowState.Maximized;
SHFullScreen(Handle, SHFS_HIDESIPBUTTON);
SHFullScreen(Handle, SHFS_HIDESTARTICON);
SHFullScreen(Handle, SHFS_HIDETASKBAR);
#endregion
}
#endregion
希望对您有帮助:)
Hope this helps you :)