View Single Post
Old 29.06.2007, 20:18   #2
PyroMaker
Архивный участник
 
Join Date: Nov 2006
Posts: 277
Default

In case you just wanna give a quick look in the code, here it is:

Code:
unit VendettaManager;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, jpeg, Shellapi, ExtCtrls;

type
  TVendettaManagerForm1 = class(TForm)
    Background: TPanel;
    BackgroundImage: TImage;
    // Change the names of the buttons below.
    Vendetta: TButton;
    TestServer: TButton;
    Zion: TButton;
    Exit: TButton;
    procedure ExitClick(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure VendettaClick(Sender: TObject);
    procedure ZionClick(Sender: TObject);
    procedure TestServerClick(Sender: TObject);
  private
    { Private declarations }
  public
    { This is an application I created for my server, it basically
      connects to the server you click at using the command
    mstsc -v:xxx.xxx.xxx.xxx /F -console - Sparing people some work.

                                         PyroMaker.
                                         www.l2-vendetta.com }
  end;

var
  VendettaManagerForm1: TVendettaManagerForm1;
  Command : Array[0..1024] of Char;
  Parms : Array[0..1024] of Char;

implementation

{$R *.dfm}

Procedure ExecuteProgram(Name,Parameters:String);
Begin
StrPCopy(Command,Name);
StrPCopy(Parms,Parameters);
ShellExecute(0,nil,Command,Parms,nil,sw_showmaximized)
; End;

procedure TVendettaManagerForm1.ExitClick(Sender: TObject);
begin
close();
end;

procedure TVendettaManagerForm1.VendettaClick(Sender: TObject);
begin
// -----------------------------------> CHANGE YOUR IP HERE <------------------------------
shellexecute (handle, 'open', 'mstsc', '-v:xx.xx3.1xx.xx5 /F -console', nil, sw_shownormal);
end;

procedure TVendettaManagerForm1.ZionClick(Sender: TObject);
begin
// -----------------------------------> CHANGE YOUR IP HERE <------------------------------
shellexecute (handle, 'open', 'mstsc', '-v:xx.xx3.1xx.xx /F -console', nil, sw_shownormal);
end;

procedure TVendettaManagerForm1.TestServerClick(Sender: TObject);
begin
// -----------------------------------> CHANGE YOUR IP HERE <------------------------------
shellexecute (handle, 'open', 'mstsc', '-v:xx.xx3.1xx.xx2 /F -console', nil, sw_shownormal);
end;

end.
PyroMaker is offline