---
title: "Delphi 无边框全屏不遮挡任务栏"
author: "kong6001"
date: "2011-01-25T15:01:19Z"
tags: ["Delphi"]
categories: ["编程语言"]
slug: "delphi"
draft: false
lastmod: "2011-01-25T15:01:19Z"
id: 895074
url: "https://fanchi.iteye.com/blog/895074"
---

{声明 拦截最大化，最小化命令，从新设置屏幕高度}  
   procedure   WMGetMinMaxInfo(var   mes:   TWMGetMinMaxInfo);message   WM\_GetMinMaxInfo;

 

{截获系统消息，然后改写窗体最大化高度。Screen.WorkAreaHeight就是屏幕高度减去任务栏的高度}  
procedure   TForm1.WMGetMinMaxInfo(var   mes:   TWMGetMinMaxInfo);  
begin  
    mes.MinMaxInfo.ptMaxSize.X   :=   Screen.Width;  
    mes.MinMaxInfo.ptMaxSize.Y   :=   Screen.WorkAreaHeight;  
    mes.Result   :=   0;  
    inherited;  
end;