PDA

View Full Version : کلیک روی دکمه ای در Folder Options



hojjatcroos
یک شنبه 08 دی 1387, 14:20 عصر
من دو تا فرم دارم می خواهم از روی یک فرم روی دکمه فرم دیگه کلیک کنم .لطفا کمک کنید

miladnoori67
یک شنبه 20 بهمن 1387, 15:49 عصر
سلام
دوست عزیز شما باید توی فرم مبدا به این صورت عمل کنید:



unit Unit1;

interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
procedure FormShow(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
uses Unit2;
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
Form2.Button1.Click;
end;
procedure TForm1.FormShow(Sender: TObject);
begin
Form2.Show;
end;
end.