最大化的窗口大于桌面

时间:2014-05-25 12:30:36

标签: delphi windows-xp

在一台XP机器上,当它最大化时,我的表格比桌面大。这有什么可以做的Delphi或者有些设置需要在XP中进行调整吗?

编辑; 正如您所看到的,当边框图标到位时,大约有15%的表单被截断,并且正好在表单最大化时它们应该处于什么位置。没有第二个监视器。enter image description here

3 个答案:

答案 0 :(得分:7)

这是因为在旧版本的Windows中 - 包括XP - 最大化的窗口足够大,窗口边框不可见。窗口边框没有被移除,只是窗口比屏幕稍微大一点,然后在屏幕上居中,因此边框不可见。

如果您有多台显示器,您可以看到这一点:根据您的Windows版本,如果您在一个屏幕上最大化窗口,您可能会看到窗口的边缘出现在另一台显示器的侧面。

这不是一个错误,也不是通过Windows设置或Delphi解决的问题。

这在Vista中可视化解决:边框仍然存在(并且窗口大小可能会报告与屏幕大小不同的大小)但是不会绘制悬垂边框。

您可以在Raymond Chen's blog post about the topic上阅读更多内容。

答案 1 :(得分:3)

您的最终用户使用其中一种用于扩展桌面空间的软件是非常有用的。这样的程序所做的是,如果某些监视器和任何应用程序窗口总是调整到工作区边界,它们会扩展工作区域大小。

我建议您尝试在最终用户计算机上运行此代码,以获取有关其屏幕大小,工作区大小,使用的屏幕数量等的更多信息。

procedure CheckScreenInfo;
var I: Integer;
begin
  Memo1.Lines.Clear;
  Memo1.Lines.Add('Monitor count:'+IntToStr(Screen.MonitorCount));
  Memo1.Lines.Add('Form is on monitor:'+IntToStr(Form4.Monitor.MonitorNum));
  Memo1.Lines.Add('Desktop left:'+IntToStr(Screen.DesktopLeft));
  Memo1.Lines.Add('Desktop top:'+IntToStr(Screen.DesktopTop));
  Memo1.Lines.Add('Desktop width:'+IntToStr(Screen.DesktopWidth));
  Memo1.Lines.Add('Desktop height:'+IntToStr(Screen.DesktopHeight));
  Memo1.Lines.Add('Screen width:'+IntToStr(Screen.Width));
  Memo1.Lines.Add('Screen height:'+IntToStr(Screen.Height));
  Memo1.Lines.Add('Work area left:'+IntToStr(Screen.WorkAreaLeft));
  Memo1.Lines.Add('Work area top:'+IntToStr(Screen.WorkAreaTop));
  Memo1.Lines.Add('Work area width:'+IntToStr(Screen.WorkAreaWidth));
  Memo1.Lines.Add('Work area height:'+IntToStr(Screen.WorkAreaHeight));
  for I := 0 to Screen.MonitorCount -1 do
  begin
    Memo1.Lines.Add('#####-Monitor '+IntToStr(Screen.Monitors[I].MonitorNum)+'-#####');
    Memo1.Lines.Add('Monitor left:'+IntToStr(Screen.Monitors[I].Left));
    Memo1.Lines.Add('Monitor top:'+IntToStr(Screen.Monitors[I].Top));
    Memo1.Lines.Add('Monitor width:'+IntToStr(Screen.Monitors[I].Width));
    Memo1.Lines.Add('Monitor height:'+IntToStr(Screen.Monitors[I].Height));
    Memo1.Lines.Add('Monitor workarea top:'+IntToStr(Screen.Monitors[I].WorkareaRect.Top));
    Memo1.Lines.Add('Monitor workarea left:'+IntToStr(Screen.Monitors[I].WorkareaRect.Left));
    Memo1.Lines.Add('Monitor workarea width:'+IntToStr(Screen.Monitors[I].WorkareaRect.Width));
    Memo1.Lines.Add('Monitor workarea height:'+IntToStr(Screen.Monitors[I].WorkareaRect.Height));
    Memo1.Lines.Add('Monitor bounds top:'+IntToStr(Screen.Monitors[I].BoundsRect.Top));
    Memo1.Lines.Add('Monitor bounds left:'+IntToStr(Screen.Monitors[I].BoundsRect.Left));
    Memo1.Lines.Add('Monitor bounds width:'+IntToStr(Screen.Monitors[I].BoundsRect.Width));
    Memo1.Lines.Add('Monitor bounds height:'+IntToStr(Screen.Monitors[I].BoundsRect.Height));
  end;
end;

答案 2 :(得分:0)

您确定屏幕偏移/尺寸是否正确?边缘可能在桌面区域之外,而不会引起注意。尝试进入显示器校准菜单并验证左上/右下偏移。

也可以将屏幕尺寸设置为大于屏幕可以处理的尺寸。

当您在桌面上移动时,屏幕会滚动吗?

如果是这样,我认为这是问题,在这种情况下,您需要使用屏幕分辨率或桌面设置。

我打赌是第一个解决方案。