本文介绍了如何在紧凑的框架中隐藏标题栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在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

推荐答案

#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 :)


这篇关于如何在紧凑的框架中隐藏标题栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-24 07:38