var
bymxx:hwnd;
begin
bymxx:=findwindow(nil,'açılacak uygulama');
setforegroundwindow(bymxx);
setwindowpos(bymxx,hwndinsert,15,15,200,200,uflags);
GetWindowTextLength(bymxx);
label1.Caption:=inttostr(bymxx);
setwindowlong(bymxx,GWL_EXSTYLE,gwl_exstyle);
movewindow(bymxx,150,150,700,700,true);true-false;pencereyi taşıyor
enablewindow(bymxx,true);pencere aktif false olursa pencere hiç seçilmiyor;
setwindowtext(bymxx,nil);
closewindow(hwnd numarası );
procedure TForm1.Button3Click(Sender: TObject);/////taskbargüm
var baslik: pchar;
begin
baslik := 'Shell_TrayWnd'; //class adı
ShowWindow(FindWindow(baslik,nil), SW_hide);
end;
////başka bir yöntem
procedure HideStartButton;
var
taskbarhandle,
buttonhandle : HWND;
begin
taskbarhandle := FindWindow('Shell_TrayWnd', nil);
buttonhandle := GetWindow(taskbarhandle, GW_CHILD);
ShowWindow(buttonhandle, SW_HIDE);
end;
//en kısası
ShowWindow(FindWindow('Shell_TrayWnd', nil), SW_HIDE); //gizle
//cdrom aç kapa
mcisendstring('set cdaudio door closed',nil,0,handle);//kapama uses mmsystem
mcisendstring('set cdaudio door open',nil,0,handle);
shellexecute(0,'open','c:\abc.txt','','',sw_show);uses shellapi;
shellexecute(hwnd,'open','http://www.gazi.edu.tr',nil,nil,sw_showmaximized);//bu şekilde olur
uses shellapi;
var
Form1: TForm1;
stray:notifyicondata;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
stray.cbsize:=sizeof(notifyicondata);
stray.wnd:=form1.handle;
stray.uid:=0;
stray.szTip:='bizim uygulama'#0;
stray.uCallbackMessage:=$200;
stray.uFlags:=7;
stray.hIcon:=application.Icon.Handle;;
shell_notifyicon(0,@stray); //systemtraya ekle
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
stray.szTip:='bizim uygulama çalışıyor'#0;
shell_notifyicon(1,@stray);//güncelle
end;
procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
shell_notifyicon(2,@stray);//systemden kaldırır
end;
end.
//kapat butonu iptal
var
hMenuHandle: Integer;
begin
hMenuHandle := GetSystemMenu(Handle, False);
if (hMenuHandle <> 0) then
DeleteMenu(hMenuHandle, SC_CLOSE, MF_BYCOMMAND);
end;
implementation
function SendKeys(ClassOrCaption
Char;Keys:array of Integer):Boolean;
var
hW:HWND;
Ix:Integer;
begin
hW:=FindWindow(ClassOrCaption,nil);
if hW<=0 then hW:=FindWindow(nil,ClassOrCaption);
Result:=hW>0;
if Result then begin
Result:=SetForeGroundWindow(hW);
if not Result then Exit;
for Ix:=0 to High(Keys) do KeyBd_Event(Keys[Ix], 0, 0, 0);
for Ix:=High(Keys) downto 0 do Keybd_Event(Keys[Ix], 0, KEYEVENTF_KEYUP, 0);
end;
end;
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
SendKeys('SciCalc',[49,50,51,52,53,54,56]);
end;
setcursorpos(x,y);
setactivewindows(hwnd);
sendmessage(hwnd,gidecekmsj,extrabilgi,0);
postmessage'da aynısı
getdesktopwindow;seçilenpencereye komut gönderir
artık bi teşekkürü çok görmezsiniz herhalde???
bymxx:hwnd;
begin
bymxx:=findwindow(nil,'açılacak uygulama');
setforegroundwindow(bymxx);
setwindowpos(bymxx,hwndinsert,15,15,200,200,uflags);
GetWindowTextLength(bymxx);
label1.Caption:=inttostr(bymxx);
setwindowlong(bymxx,GWL_EXSTYLE,gwl_exstyle);
movewindow(bymxx,150,150,700,700,true);true-false;pencereyi taşıyor
enablewindow(bymxx,true);pencere aktif false olursa pencere hiç seçilmiyor;
setwindowtext(bymxx,nil);
closewindow(hwnd numarası );
procedure TForm1.Button3Click(Sender: TObject);/////taskbargüm
var baslik: pchar;
begin
baslik := 'Shell_TrayWnd'; //class adı
ShowWindow(FindWindow(baslik,nil), SW_hide);
end;
////başka bir yöntem
procedure HideStartButton;
var
taskbarhandle,
buttonhandle : HWND;
begin
taskbarhandle := FindWindow('Shell_TrayWnd', nil);
buttonhandle := GetWindow(taskbarhandle, GW_CHILD);
ShowWindow(buttonhandle, SW_HIDE);
end;
//en kısası
ShowWindow(FindWindow('Shell_TrayWnd', nil), SW_HIDE); //gizle
//cdrom aç kapa
mcisendstring('set cdaudio door closed',nil,0,handle);//kapama uses mmsystem
mcisendstring('set cdaudio door open',nil,0,handle);
shellexecute(0,'open','c:\abc.txt','','',sw_show);uses shellapi;
shellexecute(hwnd,'open','http://www.gazi.edu.tr',nil,nil,sw_showmaximized);//bu şekilde olur
uses shellapi;
var
Form1: TForm1;
stray:notifyicondata;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
stray.cbsize:=sizeof(notifyicondata);
stray.wnd:=form1.handle;
stray.uid:=0;
stray.szTip:='bizim uygulama'#0;
stray.uCallbackMessage:=$200;
stray.uFlags:=7;
stray.hIcon:=application.Icon.Handle;;
shell_notifyicon(0,@stray); //systemtraya ekle
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
stray.szTip:='bizim uygulama çalışıyor'#0;
shell_notifyicon(1,@stray);//güncelle
end;
procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
shell_notifyicon(2,@stray);//systemden kaldırır
end;
end.
//kapat butonu iptal
var
hMenuHandle: Integer;
begin
hMenuHandle := GetSystemMenu(Handle, False);
if (hMenuHandle <> 0) then
DeleteMenu(hMenuHandle, SC_CLOSE, MF_BYCOMMAND);
end;
implementation
function SendKeys(ClassOrCaption

var
hW:HWND;
Ix:Integer;
begin
hW:=FindWindow(ClassOrCaption,nil);
if hW<=0 then hW:=FindWindow(nil,ClassOrCaption);
Result:=hW>0;
if Result then begin
Result:=SetForeGroundWindow(hW);
if not Result then Exit;
for Ix:=0 to High(Keys) do KeyBd_Event(Keys[Ix], 0, 0, 0);
for Ix:=High(Keys) downto 0 do Keybd_Event(Keys[Ix], 0, KEYEVENTF_KEYUP, 0);
end;
end;
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
SendKeys('SciCalc',[49,50,51,52,53,54,56]);
end;
setcursorpos(x,y);
setactivewindows(hwnd);
sendmessage(hwnd,gidecekmsj,extrabilgi,0);
postmessage'da aynısı
getdesktopwindow;seçilenpencereye komut gönderir
artık bi teşekkürü çok görmezsiniz herhalde???