5,388
社区成员
发帖
与我相关
我的任务
分享
for i := 0 to self.ScrollBoxInfo.ComponentCount - 1 do
begin
if self.ScrollBoxInfo.Components[i] is TCheckBox then
begin
if TCheckBox(self.ScrollBoxInfo.Components[i]).Checked then
begin
MoveUnit.strInfo.Add(TCheckBox(self.ScrollBoxInfo.Components[i]).Caption);
if TCheckBox(self.ScrollBoxInfo.Components[i]).Color = clTeal then
MoveUnit.strInfoEnd.Add(TCheckBox(self.ScrollBoxInfo.Components[i]).Caption)
else
MoveUnit.strInfoEnd.Add('gb');
end
else
begin
MoveUnit.strInfo.Add('null');
MoveUnit.strInfoEnd.Add('gb');
end;
end;
end;
procedure TForm1.Timer1Timer(Sender: TObject);
var
Pos: TPoint;
Handle: HWND;
ScreenDC: HDC;
Buf: array[0..1024] of Char;
ScreenColor: COLORREF;
begin
GetCursorPos(Pos);
Handle := WindowFromPoint(Pos); // 返回当前位置的句柄
HandleText.Caption := IntToStr(Handle);
GetClassName(Handle, Buf, 1024); // 得到类名
ClassNameText.Caption := Buf;
SendMessage(Handle, WM_GETTEXT, 33, Integer(@Buf)); // 得到标题
TitleText.Caption := Buf;
end;