unit panel_start;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Grids, Calendar, Menus, ComCtrls, ExtCtrls, StdCtrls, FileCtrl,
Outline, DirOutln, OleCtrls, SHDocVw, OleServer, WordXP;
type
TPanel =
class(TForm)
menu: TMainMenu;
menucontroll: TMenuItem;
Beenden2: TMenuItem;
Minimieren1: TMenuItem;
Kalender: TMonthCalendar;
Button1: TButton;
procedure Beenden2Click(Sender: TObject);
procedure Minimieren1Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Panel: TPanel;
implementation
{$R *.dfm}
procedure PressKey(Key: Word);
overload;
begin
keybd_event(Key, 0, 0, 0);
keybd_event(Key, 0, KEYEVENTF_KEYUP, 0);
end;
procedure PressKey(Key: Char);
overload;
begin
PressKey(vkKeyScan(Key));
end;
procedure TPanel.Beenden2Click(Sender: TObject);
begin
Panel.Close;
end;
procedure TPanel.Minimieren1Click(Sender: TObject);
begin
Panel.WindowState := wsMinimized;
end;
procedure TPanel.Button1Click(Sender: TObject);
var
wnd: HWND;
begin
wnd := FindWindow('
notepad',
nil);
begin
wnd := FindWindowEx(wnd, 0, '
Edit',
nil);
PressKey(vk_NUMPAD1);
PressKey(vk_SPACE);
PressKey(vk_NUMPAD1);
PressKey(vk_SPACE);
PressKey(vk_NUMPAD1);
PressKey(vk_SPACE);
end;
end;
end.