arkadaslar aslında bende task barda formalrı acıp taskbardaki program başlıkalrını cogaltmak hiç hosuma gitmiyor ama ne yapalım artık patrona ne dediysem ikna edemedim
illa acılcakmıs micro faln acılıyormus neyse 2 gunumu aldı ama sonunda
amacıma ulastım uyarı mesajı için bir form yapın ve o formda gosterin daha gorsel oluyor birde showmodal olarak cagırısanız tum program o işin birmesini bekliyor onun yerine show ile cagırın formları
ben soyle yaptım
Kod: Tümünü seç
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
fatfrm:array [0..1] of TForm;
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
uses Unit2;
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
fatfrm[0]:=TForm2.Create(self);
fatfrm[0].Show;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
fatfrm[1]:=TForm2.Create(self);
fatfrm[1].Show;
end;
end.
form2 içerigi
Kod: Tümünü seç
unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm2 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
procedure CreateParams (var Params : TCreateParams); override;
public
{ Public declarations }
end;
var
Form2: TForm2;
implementation
uses Unit3;
{$R *.dfm}
procedure TForm2.CreateParams(var Params: TCreateParams);
begin
inherited CreateParams(Params);
with Params do begin
ExStyle := ExStyle or WS_EX_APPWINDOW;
WndParent := GetDesktopwindow;
end;
end;
procedure TForm2.Button1Click(Sender: TObject);
begin
if not Assigned(form3) then
form3:=TForm3.Create(self);
form3.Show;
end;
end.
form3 ise
Kod: Tümünü seç
unit Unit3;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm3 = class(TForm)
Button1: TButton;
Edit1: TEdit;
procedure Button1Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormDestroy(Sender: TObject);
private
{ Private declarations }
procedure CreateParams (var Params : TCreateParams); override;
public
{ Public declarations }
end;
var
Form3: TForm3;
implementation
uses Unit2;
{$R *.dfm}
procedure TForm3.CreateParams(var Params: TCreateParams);
begin
inherited;
if (Parent <> nil) or (ParentWindow <> 0) then
Exit; // must not mess with wndparent if form is embedded
if Assigned(Owner) and (Owner is TWincontrol) then
Params.WndParent := TWinControl(Owner).handle
else
if Assigned(Screen.Activeform) then
Params.WndParent := Screen.Activeform.Handle
end;
procedure TForm3.Button1Click(Sender: TObject);
begin
//Form2(Owner).Button1.Caption:='10';
(Owner as TForm2).Button1.Caption:=edit1.text;
end;
procedure TForm3.FormClose(Sender: TObject; var Action: TCloseAction);
begin
action:=cafree;
end;
procedure TForm3.FormDestroy(Sender: TObject);
begin
Form3:=nil;
end;
işinize yarar umarım ama ben tavsiye etmiyorum