資源簡介
C#編寫,實現了遠程控制 、桌面查看、 遠程開關機、 按鍵記錄、 鼠標控制,測試過能用,詳細說明在包內,內有說明。以前5分太多了,現在改了

代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Text;
using?System.Windows.Forms;
using?System.Net.Sockets;
using?System.IO;
using?System.Threading;
using?System.Drawing.Imaging;
using?System.Runtime.InteropServices;
namespace?SocketCaptureClient
{
????public?partial?class?CaptureClientFrm?:?Form
????{
????????#region???聲明變量和調用的Windows庫函數
????????private?const?int?MOUSEEVENTF_LEFTDOWN?=?0x0002;?//模擬鼠標左鍵按下
????????private?const?int?MOUSEEVENTF_LEFTUP?=?0x0004;??//模擬鼠標左鍵抬起?
????????private?const?int?MOUSEEVENTF_RIGHTDOWN?=?0x0008;?//模擬鼠標右鍵按下?
????????private?const?int?MOUSEEVENTF_RIGHTUP?=?0x0010;?//模擬鼠標右鍵抬起
????????//調用系統函數?將鼠標移動到相應位置
????????[DllImport?(?“user32.dll“??EntryPoint?=?“SetCursorPos“?)]
????????public?extern?static?bool?SetCursorPos?(?int?x??int?y?);
????????//調用系統函數?鼠標事件函數
????????[DllImport?(?“user32“??EntryPoint?=?“mouse_event“?)]
????????private?static?extern?int?mouse_event?(?int?dwFlags??int?dx??int?dy??int?cButtons??int?dwExtraInfo?);
????????#endregion
????????public?CaptureClientFrm?(?)
????????{
????????????InitializeComponent?(?);
????????????ipAddress.Text?=?“192.168.0.16“;
????????????nudPort.Value?=?10001;
????????}
????????private?string?serveraddress?=?“192.168.0.16“;
????????private?int?serverport?=?10001;//端口?
????????private?Thread?tReceive;//處理線程?
????????private?TcpClient?clientsocket;//client套接字?
????????private?NetworkStream?ns;
????????private?StreamReader?sr;
????????private?bool?connected;
????????bool?keepalive?=?true;
????????void?InfoDeal?(?string?strRet?)
????????{
????????????string?[]sATmp?=strRet.Split?(?‘_‘?);
????????????if?(?sATmp.Length?==?2?)
????????????{
????????????????try
????????????????{
????????????????????if?(?sATmp?[?0?]?==?“Key“?)
????????????????????{
????????????????????????try
????????????????????????{
????????????????????????????KeyBoardClss.keyInput_single?(?sATmp?[?1?]?);
????????????????????????}
????????????????????????catch?(?Exception?ex?)?{?MessageBox.Show?(?ex.Message??“ErrorInfo_InfoDeal“??MessageBoxButtons.OK??MessageBoxIcon.Error?);?}
????????????????????}
????????????????????else?if?(?sATmp?[?0?]?==?“Timer“?)
????????????????????{
????????????????????????bool?isEnabled?=bool.Parse?(?sATmp?[?1?]?);
????????????????????????if?(?timer1.Enabled?!=?isEnabled?)
????????????????????????????timer1.Enabled?=?isEnabled;
????????????????????}
????????????????}
????????????????catch?(?Exception?ex?)
????????????????{
????????????????????MessageBox.Show?(?ex.Message??“ErrorInfo_InfoDeal“??MessageBoxButtons.OK??MessageBoxIcon.Error?);
????????????????}
????????????}
????????????else?if?(?sATmp.Length?>=?2?||?sATmp.Length?==?1?||?sATmp.Length?==?0?)
????????????{
????????????????MouseClss.OperMouse?(?strRet?);
????????????}
????????}
????????///?
????????///?接收信息
????????///?
????
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????6766??2002-01-09?10:54??簡單的遠程桌面\SocketCaptureMain\Com00.ICO
?????文件???????7406??2010-03-04?13:38??簡單的遠程桌面\SocketCaptureMain\Com100.ICO
?????文件???????7406??2002-01-09?10:54??簡單的遠程桌面\SocketCaptureMain\Com11.ICO
?????文件????????498??2010-02-09?16:35??簡單的遠程桌面\SocketCaptureMain\Program.cs
?????文件???????5772??2010-03-04?13:39??簡單的遠程桌面\SocketCaptureMain\SocketCaptureMain.csproj
?????文件??????20667??2010-04-06?17:22??簡單的遠程桌面\SocketCaptureMain\SocketMainFrm.cs
?????文件??????19255??2010-04-06?17:22??簡單的遠程桌面\SocketCaptureMain\SocketMainFrm.Designer.cs
?????文件???????6209??2010-04-06?17:22??簡單的遠程桌面\SocketCaptureMain\SocketMainFrm.resx
?????文件???????1150??2010-03-03?09:41??簡單的遠程桌面\SocketCaptureMain\Resources\00572.ico
?????文件???????1150??2010-02-26?10:13??簡單的遠程桌面\SocketCaptureMain\Resources\Add_1.ico
?????文件???????1150??2010-03-03?09:37??簡單的遠程桌面\SocketCaptureMain\Resources\calculation.ico
?????文件??????23904??2010-02-26?10:13??簡單的遠程桌面\SocketCaptureMain\Resources\clock_hands.png
?????文件???????1150??2010-02-26?10:13??簡單的遠程桌面\SocketCaptureMain\Resources\close.ico
?????文件???????1150??2010-02-26?10:13??簡單的遠程桌面\SocketCaptureMain\Resources\Conn.ico
?????文件???????2238??2010-02-26?10:13??簡單的遠程桌面\SocketCaptureMain\Resources\Connection.ICO
?????文件???????1150??2010-02-26?10:13??簡單的遠程桌面\SocketCaptureMain\Resources\Disconn.ico
?????文件????????766??2010-02-26?10:13??簡單的遠程桌面\SocketCaptureMain\Resources\DisConnection.ICO
?????文件???????1150??2010-02-26?10:13??簡單的遠程桌面\SocketCaptureMain\Resources\DownFile.ico
?????文件??????21357??2010-02-26?10:15??簡單的遠程桌面\SocketCaptureMain\Resources\DownUp.png
?????文件???????1150??2010-02-26?10:13??簡單的遠程桌面\SocketCaptureMain\Resources\importUser.ico
?????文件???????1150??2010-02-26?10:13??簡單的遠程桌面\SocketCaptureMain\Resources\Input.ico
?????文件???????1150??2010-02-26?10:13??簡單的遠程桌面\SocketCaptureMain\Resources\Modfiy.ico
?????文件????????766??2010-03-03?09:44??簡單的遠程桌面\SocketCaptureMain\Resources\Oth117.ICO
?????文件???????1150??2010-02-26?10:13??簡單的遠程桌面\SocketCaptureMain\Resources\Output.ico
?????文件???????1150??2010-02-26?10:13??簡單的遠程桌面\SocketCaptureMain\Resources\Outputxm
?????文件???????1150??2010-02-26?10:13??簡單的遠程桌面\SocketCaptureMain\Resources\pause.ico
?????文件???????1150??2010-02-26?10:13??簡單的遠程桌面\SocketCaptureMain\Resources\Query.ico
?????文件???????1150??2010-02-26?10:13??簡單的遠程桌面\SocketCaptureMain\Resources\ReadData.ico
?????文件???????1150??2010-02-26?10:13??簡單的遠程桌面\SocketCaptureMain\Resources\ReadInfo.ico
?????文件???????1150??2010-02-26?10:13??簡單的遠程桌面\SocketCaptureMain\Resources\send.ico
............此處省略75個文件信息
評論
共有 條評論