procedure TForm1.SpeedButton1MouseDown(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
if button=mbright then
begin
showmessage('to minimize the window.');
end;
end;
//最小化窗体
procedure TForm1.SpeedButton1Click(Sender: TObject);
begin
Form1.WindowState:=wsMinimized;//application.Minimize;
end;
//右击最小化按钮
procedure TForm1.SpeedButton1MouseDown(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
if button=mbright then
begin
showmessage('to minimize the window.');
end;
end;
//最大化窗体
procedure TForm1.SpeedButton2Click(Sender: TObject);
begin
Form1.WindowState:=wsMaximized
end;
//右击最大化按钮
procedure TForm1.SpeedButton2MouseDown(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
if button=mbright then
begin
showmessage('to maximize the window.');
end;
end;
//退出系统
procedure TForm1.SpeedButton3Click(Sender: TObject);
begin
close
end;
//右击退出系统按钮
procedure TForm1.SpeedButton3MouseDown(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
if button=mbright then
begin
showmessage('to close the window.');
end;
end;