unit Unit1;
interface
uses
Winapi.Windows,IniFiles, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ComCtrls,
Vcl.ExtCtrls, Vcl.Menus,shellapi;
type
TForm1 = class(TForm)
Panel1: TPanel;
Button1: TButton;
Button2: TButton;
Button3: TButton;
Button4: TButton;
Button5: TButton;
MainMenu1: TMainMenu;
V1: TMenuItem;
M1: TMenuItem;
S1: TMenuItem;
Timer1: TTimer;
Timer2: TTimer;
PageControl1: TPageControl;
TabSheet1: TTabSheet;
TabSheet2: TTabSheet;
TabSheet3: TTabSheet;
ListBox1: TListBox;
Memo1: TMemo;
Button6: TButton;
GroupBox1: TGroupBox;
ScrollBar1: TScrollBar;
Label1: TLabel;
CheckBox1: TCheckBox;
procedure Timer1Timer(Sender: TObject);
procedure V1Click(Sender: TObject);
procedure Timer2Timer(Sender: TObject);
procedure M1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure ScrollBar1Change(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button5Click(Sender: TObject);
procedure CheckBox1Click(Sender: TObject);
procedure Memo1Click(Sender: TObject);
procedure Button6Click(Sender: TObject);
procedure ListBox1DblClick(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
sl:TstringList;
s:string;
option:Tinifile;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
shellexecute(Form1.Handle, 'open','https://mail.google.com/mail/u/0/#inbox ',nil,nil,SW_RESTORE) ;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
shellexecute(Form1.Handle, 'open','https://www.youtube.com/',nil,nil,SW_RESTORE) ;
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
shellexecute(Form1.Handle, 'open','http://rawr.su/',nil,nil,SW_RESTORE) ;
end;
procedure TForm1.Button4Click(Sender: TObject);
begin
shellexecute(Form1.Handle, 'open','http://tophope.ru/forum/',nil,nil,SW_RESTORE) ;
end;
procedure TForm1.Button5Click(Sender: TObject);
begin
shellexecute(Form1.Handle, 'open','https://guardianelinks.de/forums/ ',nil,nil,SW_RESTORE) ;
end;
//add Links Buttom
procedure TForm1.Button6Click(Sender: TObject);
begin
if Memo1.Text=' ' then
begin
showmessage('Add Links');
end else
s:=Memo1.Lines.GetText;
sl:=TstringList.Create;
sl.Sorted:=True;
sl.Duplicates:=dupError;
try
sl.Add(s);
listbox1.Items.Add(s);
except
caption:='Duplicate Link';
end;
end;
procedure TForm1.CheckBox1Click(Sender: TObject);
begin
if CheckBox1.Checked then
begin
Form1.FormStyle:=fsStayOntop;
Checkbox1.Caption:='Top';
end else
begin
Form1.FormStyle:=fsNormal;
Checkbox1.Caption:='Normal';
end;
end;
procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
option:=TIniFile.Create(ExtractFilePath(Application.ExeName)+'option.ini');
option.WriteInteger('Transparents','Value',ScrollBar1.Position);
ListBox1.Items.SaveToFile(ExtractFilePath(Application.ExeName)+'Links.txt');
option.WriteBool('Window','Checked',CheckBox1.Checked);
option.Free;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
form1.Width:= 221 ;
ScrollBar1.Position:= 255;
label1.Caption:=IntToStr(ScrollBar1.Position);
option:=TIniFile.Create(ExtractFilePath(Application.ExeName)+'option.ini');
ScrollBar1.Position:=option.ReadInteger('Transparents','Value',ScrollBar1.Position);
ListBox1.Items.LoadFromFile(ExtractFilePath(Application.ExeName)+'Links.txt');
CheckBox1.Checked:=option.ReadBool('Window','Checked',CheckBox1.Checked);
option.Free;
end;
//Links
procedure TForm1.ListBox1DblClick(Sender: TObject);
var
p:PWideChar;
begin
p:=PWideChar(ListBox1.Items[Listbox1.ItemIndex]);
shellexecute(Form1.Handle, 'open',p,nil,nil,SW_RESTORE) ;
end;
procedure TForm1.M1Click(Sender: TObject);
begin
if form1.Width = 221 then
begin
Timer1.Enabled:=False;
//showmessage ('Error');
end else
Timer2.Enabled:=True;
if Timer1.Enabled=True then
begin
Timer1.Enabled:=False;
end;
end;
procedure TForm1.Memo1Click(Sender: TObject);
begin
Memo1.lines.Clear;
end;
procedure TForm1.ScrollBar1Change(Sender: TObject);
begin
Form1.AlphaBlendValue:=ScrollBar1.Position;
label1.Caption:=IntToStr(ScrollBar1.Position);
end;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
if Timer1.Enabled=True then
begin
form1.Width:=form1.Width+2
end;
if form1.Width=537 then
begin
Timer1.Enabled:=false;
end;
end;
procedure TForm1.Timer2Timer(Sender: TObject);
begin
if Timer2.Enabled=True then
begin
form1.Width:=form1.Width-2
end;
if form1.Width=221then
begin
timer2.Enabled:=false
end;
end;
//start 1 timer
procedure TForm1.V1Click(Sender: TObject);
begin
if Form1.Width = 537 then
begin
Timer1.Enabled:=False;
//showmessage ('Error');
end else
Timer1.Enabled:=True;
if Timer2.Enabled=True then
begin
Timer2.Enabled:=False;
end;
end;
end.