“所有窗口"以全屏模式显示 [英] All Window appears in full screen mode
本文介绍了“所有窗口"以全屏模式显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好!
我已经看到任何应用程序的所有窗口都以全屏模式显示,甚至已经取消选中自动隐藏任务栏.请帮助我如何将其修复为普通视图.
操作系统:Windows XP
感谢
hi every one!
I have seen all window of any application appears in fullscreen mode even already uncheck autohide taskbar. please help me how to fix this to normal view.
OS: Windows XP
thanks
推荐答案
使用该代码来测试您的应用是否以全屏模式运行.
Herez the code to test whether your app is running in full screen mode or not.
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential)]
public struct RECT
{
public int Left;
public int Top;
public int Right;
public int Bottom;
}
public bool IsFullScreen()
{
bool runningFullScreen = false;
RECT appBounds;
Rectangle screenBounds;
IntPtr hWnd;
//get the dimensions of the active window
hWnd = GetForegroundWindow();
if (hWnd!=null && !hWnd.Equals(IntPtr.Zero))
{
//Check we haven't picked up the desktop or the shell
if (!(hWnd.Equals(desktopHandle) || hWnd.Equals(shellHandle)))
{
GetWindowRect(hWnd, out appBounds);
//determine if window is fullscreen
screenBounds = Screen.FromHandle(hWnd).Bounds;
if ((appBounds.Bottom - appBounds.Top) == screenBounds.Height && (appBounds.Right - appBounds.Left) == screenBounds.Width)
{
runningFullScreen = true;
}
}
}
return runningFullScreen;
}
稍后,可以通过减少一些屏幕坐标值将应用程序从全屏设置为普通模式,如下所示:
Later, app can be set to normal mode from full screen, by reducing few screen co-ordinates values as:
public void SetNormal()
{
IntPtr hWnd;
Rectangle screenBounds;
//get the dimensions of the active window
hWnd = GetForegroundWindow();
screenBounds = Screen.FromHandle(hWnd).Bounds;
screenBounds.Height -= 50;
screenBounds.Width -= 250;
}
这篇关于“所有窗口"以全屏模式显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文