Delphi中如何点击一下Button就执行最小化过程
展开全部
1. 利用wm_SysCommand及参数sc_Minimize:
procedure TForm1.ImgBtnMiniClick(Sender: TObject);
begin
SendMessage(handle, wm_SysCommand, sc_Minimize, 0);
end;
2. 利用WindowState:
procedure TForm1.ImgBtnMiniClick(Sender: TObject);
begin
ImgBtnMini.Cell := 1;
Form1.WindowState := wsMinimized;
end;
procedure TForm1.ImgBtnMiniClick(Sender: TObject);
begin
SendMessage(handle, wm_SysCommand, sc_Minimize, 0);
end;
2. 利用WindowState:
procedure TForm1.ImgBtnMiniClick(Sender: TObject);
begin
ImgBtnMini.Cell := 1;
Form1.WindowState := wsMinimized;
end;
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询