1,184
社区成员
发帖
与我相关
我的任务
分享
procedure TForm2.Button2Click(Sender: TObject);
begin
Self.Show;
end;
F1中B1的代码修改成如下:
procedure TForm1.Button2Click(Sender: TObject);
var
H, MyPopup: THandle;
begin
H := StrToIntDef('$' + Edit1.Text, 0);//F中C的句柄
SendMessage(H, BM_CLICK, 0, 0);
end;Controls how the window is to be shown. This parameter is ignored the first time an application calls ShowWindow, if the program that launched the application provides a STARTUPINFO structure. Otherwise, the first time ShowWindow is called, the value should be the value obtained by the WinMain function in its nCmdShow parameter. In subsequent calls, this parameter can be one of the following values.
进过实验,hide的时候,用showwindow(handlle,sw_hide)则不会出现那个问题。