P
pangzhenguang
Unregistered / Unconfirmed
GUEST, unregistred user!
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 FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
uses Unit2;
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
Form2:=TForm2.Create(Self);
Windows.SetParent(Form2.Handle,self.Handle);
Form2.Show;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
Form2.Free;
end;
end.
unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm2 = class(TForm)
Edit1: TEdit;
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form2: TForm2;
implementation
{$R *.dfm}
end.
//******************************************************
为什么我的第二个窗体的Edit1的Hint不能显示出来,把Form2的Parent设成Form1,为何Form2失去焦点时Form2上的控件的HINT就可以显示出来,Form2得到焦点时Form2上的控件的HINT就显示不出来
//******************************************************
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
uses Unit2;
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
Form2:=TForm2.Create(Self);
Windows.SetParent(Form2.Handle,self.Handle);
Form2.Show;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
Form2.Free;
end;
end.
unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm2 = class(TForm)
Edit1: TEdit;
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form2: TForm2;
implementation
{$R *.dfm}
end.
//******************************************************
为什么我的第二个窗体的Edit1的Hint不能显示出来,把Form2的Parent设成Form1,为何Form2失去焦点时Form2上的控件的HINT就可以显示出来,Form2得到焦点时Form2上的控件的HINT就显示不出来
//******************************************************