摘要载入中…    请稍等…












内容载入中…    请稍等…

如长时间看不到内容,请关闭浏览器,重新打开此页!

芯友首页 应用软件 编程开发 网络硬件 资源下载 动漫音乐 精美图库 芯友论坛 视频教程 电脑技术QQ群:72845454
 ★★photoshop学友-史上最强播放器★★
 位置:编程开发>Deiphi>Deiphi窗体文章
◎→ 本类最新
DELPHI动态生成控件
Delphi编程中创建一个启动闪现窗
在win95,win98下实现半透明的窗口
拖动无标题栏窗体的方法
用Delphi 控制窗体的大小
使MDI窗口有一个背景图象或使它平
软件启动画面中启动状态的显示
◎→相关资源
C语言入门视频教程
C#编程WinForm入门视频
Asp.net入门视频教程下载
VC++编程视频教程下载
VB窗体文章
HTML入门教程
Deiphi实例教程
Deiphi窗体文章
Deiphi数据库编程
Deiphi网络编程
Deiphi图形图象文章
Deiphi系统文件
◎→ 热门资源
Delphi数据压缩处理(2)
Delphi数据压缩处理(1)
简析Delphi中如何进行XML编程
简析Delphi中如何进行XML编程(10
Delphi下的COM编程技术简介(2)
Delphi下的COM编程技术简介(1)
用Delphi 3.0编制MP3音乐点歌台

Delphi模拟最小化恢复关闭按纽(2)


日期:2008-10-20 22:11:07    来源:
   
 ·巧用Photoshop滤镜模拟水粉花卉效果 ·恢复系统还原监视
 ·更改监视器自动关闭前的延迟时间 ·自制IE风格按纽控件

Delphi模拟最小化恢复关闭按纽;
end;

procedure TFrmMain.ApplicationEvents1Idle(Sender: TObject;
var Done: Boolean);
var
show: boolean;
begin
//当前子窗体的状态为最大化时,显示三个按纽
show := (self.ActiveMDIChild <> nil) and (self.ActiveMDIChild.WindowState =
wsMaximized);
if assigned(BtnClose) and BtnClose.Visible <> Show then
BtnClose.Visible := Show;
if assigned(BtnMin) and BtnMin.Visible <> Show then
BtnMin.Visible := Show;
if assigned(BtnRestore) and BtnRestore.Visible <> Show then
BtnRestore.Visible := Show;
end;

//设置按纽的相对位置不变

procedure TfrmMain.SetMDIFormActionPos;
begin
if assigned(BtnClose) then
begin
BtnClose.left := Width - 26;
BtnClose.top := 6;
end;
if assigned(BtnRestore) then
begin
BtnRestore.Left := Width - 44;
BtnRestore.Top := 6;
end;
if assigned(BtnMin) then
begin
BtnMin.Left := Width - 60;
BtnMin.Top := 6;
end;
end;

procedure TFrmMain.FormResize(Sender: TObject);
begin
SetMDIFormActionPos;
end;

procedure TFrmMain.FormDestroy(Sender: TObject);
begin
//释放资源
if assigned(BtnClose) then
begin
WindowClose.ActionList := nil;
WindowClose.free;
BtnClose.Free;
BtnClose := nil;
end;
if assigned(BtnRestore) then
begin
WindowRestore.ActionList := nil;
WindowRestore.free;
BtnRestore.Free;
BtnRestore := nil;
end;
if assigned(BtnMin) then
begin
WindowMinimize.ActionList := nil;
WindowMinimize.free;
BtnMin.Free;
BtnMin := nil;
end;
end;

{ TWindowRestore }

procedure TWindowRestore.ExecuteTarget(Target: TObject);
begin
inherited;
with GetForm(Target) do
ActiveMDIChild.WindowState := wsnormal;
end;

{ TMDIButton }

procedure TMDIButton.wndproc(var message: Tmessage);
begin
if message.msg = wm_SetFocus then exit;
inherited wndproc(message);
end;

{ TWindowMinimize }

procedure TWindowMinimize.ExecuteTarget(Target: TObject);
begin
inherited;
with GetForm(Target) do
ActiveMDIChild.WindowState := wsMinimized;
end;

procedure TFrmMain.open1Click(Sender: TObject);
begin
with Tform.create(self) do
begin
formstyle := fsMDIChild;
end;
end;

end.

 [1]

用Photoshop轻松模拟红外效果图

故障恢复控制台概述

关闭系统还原

Delphi模拟最小化恢复关闭按纽(1)

--->QQ空间人气精灵 V3.61┊自动模拟无数真实用户访问QQ空间┊简体中文绿色免费版
--->Opera通用设置工具 070328┊用这个工具可进行恢复后重新设置┊简体中文免费版
--->多操作系统一键恢复 V5.00┊任何单机及网吧批量硬盘克隆┊简体中文绿色免费版
--->WinRescue XP V1.08.38┊最小巧的Windows系统备份及恢复工具┊英文绿色特别版
--->一键恢复工具 V1.04┊采用GHOST11为核心、并且支持大于2G的备份┊简体中文版
Tags:  模拟 恢复 关闭 按纽

芯友网版权所有 1999-2006 | 著作权与商标声明 | 法律声明 | 服务条款 | 隐私声明 | 联系我们