procedure TForm1.btnFindClick(Sender: TObject); var hr, hr1, hr_id, hr_pwd: THandle; WindowText: array[0..MAX_PATH] of Char; begin hr := FindWindow(\'#32770\', \'TeamViewer\'); hr := FindWindowEx(hr, 0, \'MainWindowRemoteControlPage\', nil); hr1 := FindWindowEx(hr, 0, \'IncomingRemoteControlComponentView\', nil); hr_id := FindWindowEx(hr1, 0, \'CustomRunner\', nil); hr := FindWindowEx(hr_id, 0, \'Edit\', nil); SendMessage(hr, WM_GETTEXT, MAX_PATH, Longint(@WindowText)); lblID.Caption := WindowText; hr_pwd := FindWindowEx(hr1, hr_id, \'CustomRunner\', nil); hr := FindWindowEx(hr_pwd, 0, \'Edit\', nil); SendMessage(hr, WM_GETTEXT, MAX_PATH, Longint(@WindowText)); lblPWD.Caption := WindowText; end;