码农的笔记

Delphi虽好,但已不流行; 博客真好,可以做笔记

博客园 首页 新随笔 联系 订阅 管理

此处的句柄请不要用另一个程序中的控件句柄!就算用了,也找不到控件!

 

procedure TForm1.Button1Click(Sender: TObject);
begin
if FindControl(StrToIntdef(Edit1.Text,0))<>nil then
ShowMessage(FindControl(StrToIntdef(Edit1.Text,0) ).Name)
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
Edit1.Text :=IntToStr(Self.Handle);
end;

posted on 2021-01-22 16:24  码农的笔记  阅读(290)  评论(0编辑  收藏  举报