1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102
|
unit uMain;
{
Counterstrikewi
www.delphi.co.nr
}
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ShellAPI,
uFunctions, ExtCtrls, ComCtrls, StdCtrls;
type
TForm1 = class(TForm)
ListView1: TListView;
Image1: TImage;
Button1: TButton;
Label1: TLabel;
Label2: TLabel;
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure ListView1Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Label2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
lp : Integer;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
C : Integer;
begin
ListView1.Clear;
HandleList.Clear;
NameList.Clear;
lp := 0;
if EnumWindows(@zEnumProcess, lp) = false then
MessageBox(0, 'Error','Error',0);
for C := 0 to HandleList.Count - 1 do
begin
with ListView1.Items.Add do
begin
Caption := HandleList[C];
SubItems.Add(NameList[C]);
end;
end;
end;
procedure TForm1.FormCreate(Sender: TObject);
var
C : Integer;
begin
HandleList := TStringList.Create;
NameList := TStringList.Create;
lp := 0;
if EnumWindows(@zEnumProcess, lp) = false then
MessageBox(0, 'Error','Error',0);
for C := 0 to HandleList.Count - 1 do
begin
with ListView1.Items.Add do
begin
Caption := HandleList[C];
SubItems.Add(NameList[C]);
end;
end;
end;
procedure TForm1.FormDestroy(Sender: TObject);
begin
HandleList.Destroy;
NameList.Destroy;
end;
procedure TForm1.Label2Click(Sender: TObject);
begin
ShellExecute(Handle, 'open', 'http://www.delphi.co.nr',nil,nil, SW_SHOWNORMAL) ;
end;
procedure TForm1.ListView1Click(Sender: TObject);
begin
if ListView1.Items[ListView1.ItemIndex].Caption <> '' then
begin
zPrintWindow(StrToInt(ListView1.Items[ListView1.ItemIndex].Caption), Image1.Picture.Bitmap);
Image1.Refresh;
end;
end;
end. |
Partager