标签:idt col etc fst nil dateutils view hide title
procedure TMainForm.ConnectRDPByIndex(index: Integer); var ServerItem: PServerItem; tmpRpdFile, cmd: string; listview: TListView; begin listview := GetCurrentListview; if listview.Items.Count = 0 then Exit; if index > listview.Items.Count - 1 then Exit; if index < 0 then Exit; ServerItem := PServerItem(listview.Items[index].Data); tmpRpdFile := CreateRdpFile(ServerItem, listview.ItemIndex + 1, ScreenWidth, ScreenHeight, ForbidCopy); cmd := ‘/c mstsc.exe "%s" /w:%d /h:%d‘; cmd := Format(cmd, [tmpRpdFile, ScreenWidth, ScreenHeight]); AddDeleteIp(ServerItem.IP); StopLinkMstscWarning(ServerItem.IP); ShellExecute(Handle, ‘open‘, ‘cmd‘, PChar(cmd), nil, SW_HIDE); TimerCheckTitle.Enabled := HideIP; FStopTime := DateUtils.IncSecond(Now, 20); end;
procedure TMainForm.Button2Click(Sender: TObject); begin ConnectRDPByIndex(3); end;
标签:idt col etc fst nil dateutils view hide title
原文地址:https://www.cnblogs.com/onlyou13/p/13234324.html