Delphi Hide/Show taskbar

Delphi Hide/Show taskbar

Postby Dieliric » 16 Feb 2011, 17:57

Ma gandeam ca daca tot pot ascunde butonul "start" ce ar fi sa ascund toata bara :D, rezultatul este postat aici :D.

  1.  
  2. (*           Dieliric           *)
  3. (*          Hide taskbar v1     *)
  4.  
  5. unit Unit1;
  6.  
  7. interface
  8.  
  9. uses
  10.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  11.   StdCtrls;
  12.  
  13. type
  14.   TForm1 = class(TForm)
  15.     Button1: TButton;
  16.     Button2: TButton;
  17.     procedure Button1Click(Sender: TObject);
  18.     procedure Button2Click(Sender: TObject);
  19.   private
  20.     { Private declarations }
  21.   public
  22.     { Public declarations }
  23.   end;
  24.  
  25. var
  26.   Form1: TForm1;
  27.  
  28. implementation
  29.  
  30. {$R *.DFM}
  31.  
  32. procedure TForm1.Button1Click(Sender: TObject);
  33. var
  34.   WindowHandle: HWnd;
  35. begin
  36.   WindowHandle:=FindWindow('Shell_TrayWnd', '');
  37.   if WindowHandle<>0 then
  38.     ShowWindow(WindowHandle, SW_HIDE)
  39. end;
  40.  
  41. procedure TForm1.Button2Click(Sender: TObject);
  42. var
  43.   WindowHandle: HWnd;
  44. begin
  45.   WindowHandle:=FindWindow('Shell_TrayWnd', '');
  46.   if WindowHandle<>0 then
  47.     ShowWindow(WindowHandle, SW_RESTORE)
  48. end;
  49.  
  50. end.
  51.  


Sursa cu tot cu executabil aici.
Mai puteam si cu reducere opacitatii dar tot mergea sa dai click pe start sau programele din quick launch :D.
PS. Netestat decat pe xp :D.
1.5p / 2 votes
"Nu spun ca nu stiu ci nu stiu inca"
User avatar
Dieliric
Bit
 
Joined: 08 Jan 2010
Location: Roman
Status: 7

Return to Snippets

Who is online

Users browsing this forum: No registered users and 0 guests

cron