untRemoteCmd.pas
上传用户:sinothink
上传日期:2022-07-15
资源大小:459k
文件大小:1k
- {南域剑盟 www.98exe.com 上兴QQ:51992
- 声明:程序由南域剑盟98exe.com成员网上搜集,不承担技术及版权问题}
- unit untRemoteCmd;
- interface
- uses
- Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
- Dialogs, StdCtrls, ComCtrls, untCMDList, Winsock;
- type
- TForm6 = class(TForm)
- StatusBar1: TStatusBar;
- Memo1: TMemo;
- Edit1: TEdit;
- procedure Edit1KeyDown(Sender: TObject; var Key: Word;
- Shift: TShiftState);
- procedure FormClose(Sender: TObject; var Action: TCloseAction);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
- var
- Form6: TForm6;
- Sock : TSocket;
- implementation
- {$R *.dfm}
- procedure TForm6.Edit1KeyDown(Sender: TObject; var Key: Word;
- Shift: TShiftState);
- var
- Temp: String;
- begin
- If (Key = 13) Then
- If (Edit1.Text <> '') Then
- Begin
- Sock := StrToInt(StatusBar1.Panels[0].Text);
- Temp := IntToStr(C_REMOTECMD) + ' ' +
- Edit1.Text + #10;
- Send(Sock, Temp[1], Length(Temp), 0);
- Edit1.Text := '';
- End;
- end;
- procedure TForm6.FormClose(Sender: TObject; var Action: TCloseAction);
- begin
- StatusBar1.Panels[0].Text := '0';
- end;
- end.