procedure pr_PageBtn_OnClick(Sender: TObject);
var
i, j:integer;
vhandle,xhandle:Thandle;
vbuffer: array[0..255] of char;
apfunc : Pointer;
// p: PInteger;
begin
//Dll Form
vhandle := StrToInt(Copy(TSpeedButton(Sender).Name, 2, Length(TSpeedButton(Sender).Name)-1));
if vhandle = 0 then
exit;
while vhandle <> 0 do
begin
GetClassName(vhandle, vbuffer, SizeOf(vbuffer));
if vhandle = strtoint(copy(TSpeedButton(Sender).Name, 2, length(TSpeedButton(Sender).Name)-1)) then
begin
if vhandle > 0 then
begin
xhandle := findwindowex(vhandle, 0, 'MDIClient', nil);
xhandle := getwindow(vhandle, GW_CHILD);
SendMessage(vhandle, WM_CHILDACTIVATE, 0, 0);
end
else begin
TSpeedButton(Sender).Destroy;
TSpeedButton(Sender).Free;
self.Refresh;
end;
break;
end;
end;
end;
var
i, j:integer;
vhandle,xhandle:Thandle;
vbuffer: array[0..255] of char;
apfunc : Pointer;
// p: PInteger;
begin
//Dll Form
vhandle := StrToInt(Copy(TSpeedButton(Sender).Name, 2, Length(TSpeedButton(Sender).Name)-1));
if vhandle = 0 then
exit;
while vhandle <> 0 do
begin
GetClassName(vhandle, vbuffer, SizeOf(vbuffer));
if vhandle = strtoint(copy(TSpeedButton(Sender).Name, 2, length(TSpeedButton(Sender).Name)-1)) then
begin
if vhandle > 0 then
begin
xhandle := findwindowex(vhandle, 0, 'MDIClient', nil);
xhandle := getwindow(vhandle, GW_CHILD);
SendMessage(vhandle, WM_CHILDACTIVATE, 0, 0);
end
else begin
TSpeedButton(Sender).Destroy;
TSpeedButton(Sender).Free;
self.Refresh;
end;
break;
end;
end;
end;