was ist neu ¦  programmier tips ¦  indy artikel ¦  intraweb artikel ¦  informationen ¦  links ¦  interviews
 sonstiges ¦  tutorials ¦  Add&Win Gewinnspiel

Tips (1541)

Dateien (137)
Datenbanken (90)
Drucken (35)
Grafik (114)
IDE (21)
Indy (5)
Internet / LAN (130)
IntraWeb (0)
Mathematik (76)
Multimedia (45)
Oberfläche (107)
Objekte/
ActiveX (51)

OpenTools API (3)
Sonstiges (126)
Strings (83)
System (266)
VCL (242)

Tips sortiert nach
Komponente


Tip suchen

Tip hinzufügen

Add&Win Gewinnspiel

Werbung

38 Visitors Online


 
...den Start Button und das Startmenu verbergen und deaktivieren?
Autor: Thomas Stutz
[ Tip ausdrucken ]  

Tip Bewertung (7):  
     


{
  The ShowStartButton function shows how to hide the start
  button, how to disable the windows buttons (LWin and RWin)
  (indirectly) and consequently how to hide the start menu.
}

{
  Die ShowStartButton Prozedur zeigt, wie man den Startbutton
  verstecken kann und die Windows Tasten (LWin and RWin)
  indirekt deaktivieren kann. Auch der Zugriff auf das
  Startmenu wird folglich nicht mehr möglich sein.
}

procedure ShowStartButton(bvisible: Boolean);
var
  
h: hwnd;
  TaskWindow: hwnd;
begin
  if 
bvisible then
  begin
    
h := FindWindowEx(GetDesktopWindow, 0, 'Button', nil);
    TaskWindow := FindWindow('Shell_TrayWnd', nil);
    ShowWindow(h, 1);
    Windows.SetParent(h, TaskWindow);
  end 
  else
  begin
    
h := FindWindowEx(FindWindow('Shell_TrayWnd', nil), 0, 'Button', nil);
    ShowWindow(h, 0);
    Windows.SetParent(h, 0);
  end;
end;

{Example to hide/reshow the Startbutton
Beispiel, um den Startbutton zu verstecken/wieder anzuzeigen.}

procedure TForm1.Button1Click(Sender: TObject);
begin
  
ShowStartButton(False); // or true to reshow
end;

{Furthermore, you could create your own Startbutton and
replace the original one with your own.}

{Es ist auch möglich, einen "eigenen" Startbutton durch
den original Startbutton zu ersetzen.}

var
  
b: TButton;  // or another Type of button
  
h, Window: hwnd;
begin
  
Window := FindWindow('Shell_TrayWnd', nil);
  b := TButton.Create(nil);
  b.ParentWindow := Window;
  b.Caption := 'Start';
  b.Width := 60;
  b.Font.Style := [fsbold];
end;


 

Bewerten Sie diesen Tipp:

dürftig
ausgezeichnet


Copyright © by SwissDelphiCenter.ch
All trademarks are the sole property of their respective owners