如何在紧凑的框架中隐藏标题栏 [英] How to hide the title bar in compact framework

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

问题描述

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


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

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆