告诉你吧, 你上www.playicq.com下载一个远程控制的源代码。功能多多。
解决方案 »
- 求以下概率
- 文件流的一个小问题
- 散分100,谁能帮我解决这个问题?
- 如何正確獲取 VBR (動態比特率)格式的 MP3 文件的長度?
- 哪位有FastReport3序列号?可以告诉我吗,悬尝20分
- idsmtp发信,瑞星出现“网络协议错误”的提示?
- 严重提问,急急急急
- 问一个基础问题和征求一个建议...
- 《与技术总监和Borland产品专家面对面》第三期---对学生半价优惠
- 在程序内如何调用外部系统命令?
- 请问我想把一个16色的BMP LOAD 到 TIMAGE 后,如何改变调色板使图象颜色发生变化,谢谢
- 请教各位!如何在程序中调出修改系统时间的窗体!!(就是双击右下脚‘时间’时出现的窗体)!谢谢各位帮忙!!
可以去ithinking.onchina.net 下载原码。
serverport=6666;
servercomputer='ljw';
clientport=7777;
MaxuserNum=101;
type
Tservercommand=(ackconnect,acksendmsg,ackdisconnect,ackonlineuser,ackrefresh);
Tclientcommand=(connect,sendmsg,disconnect);
Tuser=record
no:integer;
servercommand:Tservercommand;
clientcommand:Tclientcommand;
Ip:string[15];
nick:shortstring;
sex:string[4];
tonick:shortstring;
msg:shortstring;
face:shortstring;
color:tcolor;
time:shortstring;
Exonline:array[1..MaxuserNum]of string[4];
ExAck:boolean;
end;procedure TForm1.udp1DataReceived(Sender: TComponent; NumberBytes: Integer;
FromIP: String; Port: Integer);
var
MyStream: TMemoryStream;
usermsg:tuser;
i,j:integer;
begin
MyStream := TMemoryStream.Create;
try
UDP1.ReadStream(MyStream);
MyStream.Read(usermsg,sizeof(usermsg));
case usermsg.clientcommand of
connect:
begin
j:=1;
for i:=1 to high(userarr) do
if userarr[i].no<>0 then
begin
onlinemsg[j].sex:=userarr[i].sex;
onlinemsg[j].nick:=userarr[i].nick;
j:=j+1;
end;
if onlinemsg[1].no<>0 then
begin
udp1.RemoteHost:=FromIp;
MyStream.Clear;
usermsg.servercommand:=ackonlineuser;
MyStream.Write(onlinemsg,sizeof(onlinemsg));
UDP1.SendStream(MyStream);
end; for i:=1 to high(userarr) do
if userarr[i].no=0 then
begin
userarr[i].no:=i;
userarr[i].ip:=fromIp;
userarr[i].nick:=usermsg.nick;
break;
end;
udp1.RemoteHost:=FromIp;
MyStream.Clear;
usermsg.no:=userarr[i].no;
usermsg.servercommand:=ackconnect;
MyStream.Write(usermsg,sizeof(usermsg));
UDP1.SendStream(MyStream); end;
disconnect:
begin
for i:=1 to high(userarr) do
if userarr[i].no=usermsg.no then
begin
userarr[i].no:=0;
break;
end;
MyStream.Clear;
udp1.RemoteHost:=fromip;
usermsg.servercommand:=ackdisconnect;
MyStream.Write(usermsg,sizeof(usermsg));
UDP1.SendStream(MyStream);
end;
sendmsg:
begin
usermsg.msg:='['+usermsg.nick+']'+usermsg.face+'对'+'['+usermsg.tonick+']'+'说>>'+string(usermsg.msg)+'('+usermsg.time+')';
usermsg.servercommand:=acksendmsg;
if usermsg.tonick='全部' then
begin
for i:=1 to high(userarr) do
begin
if trim(userarr[i].Ip)<>'' then
begin
udp1.RemoteHost:=trim(userarr[i].Ip);
mystream.Clear;
MyStream.Write(usermsg,sizeof(usermsg));
UDP1.SendStream(MyStream);
end;
end
end
else
begin
udp1.remotehost:=fromip;
mystream.Clear;
MyStream.Write(usermsg,sizeof(usermsg));
UDP1.SendStream(MyStream);
for i:=1 to high(userarr) do
if userarr[i].nick=usermsg.tonick then
begin
udp1.RemoteHost:=trim(userarr[i].Ip);
mystream.Clear;
MyStream.Write(usermsg,sizeof(usermsg));
UDP1.SendStream(MyStream);
break;
end;
end;
end;
end;
finally
freeandnil(MyStream);
end;
end;
用Socket来做需要一个服务器,一个客户端,每台机器都需要安装(C/S也如此)。
有一本《Delphi5.0程序设计》丛书(中国铁道出版社),其中Internet应用实务篇不错,强烈建议买一本看看,也许正是您所需要的。
INTENET上面一幅图像1~4秒钟
而我想要的是完全遥控远程计算机,就像TOP2000和WIN XP的远程辅助功能一样
keybd_event 模拟一个键盘事件
mouse_event 模拟一个鼠标事件
将本地的键盘、鼠标事件打包发送到远程机,远程机调用这两个API函数。再返回屏幕即可