Registriert seit: 19. Sep 2012
Ort: MD (Sachsen-Anhalt)
166 Beiträge
Delphi 2010 Enterprise
|
AW: Schließen Button
1. Mär 2013, 13:19
Delphi-Quellcode:
unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Menus, ExtCtrls, StdCtrls;
type
TForm2 = class(TForm)
MainMenu1: TMainMenu;
Datei1: TMenuItem;
Panel1: TPanel;
Lsung1: TMenuItem;
Be1: TMenuItem;
Button1: TButton;
Button2: TButton;
Button3: TButton;
Button4: TButton;
Button5: TButton;
Button6: TButton;
Button7: TButton;
Button8: TButton;
Button9: TButton;
Button10: TButton;
Button11: TButton;
Button12: TButton;
Button13: TButton;
Button14: TButton;
Button15: TButton;
Button16: TButton;
Button17: TButton;
Button18: TButton;
Button19: TButton;
Button20: TButton;
Button21: TButton;
Button22: TButton;
Button23: TButton;
Button24: TButton;
Button25: TButton;
Button26: TButton;
procedure Be1Click(Sender: TObject);
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form2: TForm2;
implementation
uses Unit3;
{$R *.dfm}
procedure TForm2.Be1Click(Sender: TObject);
begin
Form3.ShowModal;
end;
procedure TForm2.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
begin
Form3.ShowModal;
canClose := false;
end;
end.
und
Delphi-Quellcode:
unit Unit3;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm3 = class(TForm)
BtnJa: TButton;
LabelBeenden: TLabel;
BtnNein: TButton;
procedure BtnJaClick(Sender: TObject);
procedure BtnNeinClick(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form3: TForm3;
implementation
uses Unit2;
{$R *.dfm}
procedure TForm3.BtnJaClick(Sender: TObject);
begin
close;
Form2.close;
end;
procedure TForm3.BtnNeinClick(Sender: TObject);
begin
close;
end;
end.
David ApfelsineMandarineAllesGleich
Geändert von Davidlocke13 ( 1. Mär 2013 um 13:22 Uhr)
|
|
Zitat
|