AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

How to hide Startmenu

Ein Thema von Razor · begonnen am 19. Okt 2008 · letzter Beitrag vom 26. Okt 2008
Antwort Antwort
Seite 2 von 3     12 3      
Benutzerbild von jfheins
jfheins

Registriert seit: 10. Jun 2004
Ort: Garching (TUM)
4.579 Beiträge
 
#11

Re: How to hide Startmenu

  Alt 19. Okt 2008, 20:55
New question => New Thread please

Short answer: Yes, that is possible

Not-that-short-answer: Close the Button windwo and create your own one
  Mit Zitat antworten Zitat
Razor
(Gast)

n/a Beiträge
 
#12

Re: How to hide Startmenu

  Alt 19. Okt 2008, 20:56
But bitte tell me how to hide vista's button and then i compile and share everything so everybody can see!!

Danke.
  Mit Zitat antworten Zitat
Benutzerbild von jfheins
jfheins

Registriert seit: 10. Jun 2004
Ort: Garching (TUM)
4.579 Beiträge
 
#13

Re: How to hide Startmenu

  Alt 19. Okt 2008, 21:28
Use the DestroyWindow() or the CloseWindow() function

Please do open up a new topic for each new question
  Mit Zitat antworten Zitat
Razor
(Gast)

n/a Beiträge
 
#14

Re: How to hide Startmenu

  Alt 19. Okt 2008, 21:29
Can somebody type an example i haven't never done this type of programing..
  Mit Zitat antworten Zitat
Razor
(Gast)

n/a Beiträge
 
#15

Re: How to hide Startmenu

  Alt 19. Okt 2008, 22:33
Ok i made something,please comment it and why it won't work as it should..

Delphi-Quellcode:
var
  Form2: TForm2;
  handle1,taskBarWnd:hwnd;
implementation

uses Unit3;

{$R *.dfm}
procedure tform2.hide;
begin
taskBarWnd := FindWindow('Shell_TrayWnd', 0);
handle1:=FindWindowEx(taskBarWnd, 0, 'Button', 'Start');
closewindow(handle1);
end;
  Mit Zitat antworten Zitat
Benutzerbild von turboPASCAL
turboPASCAL

Registriert seit: 8. Mai 2005
Ort: Sondershausen
4.274 Beiträge
 
Delphi 6 Personal
 
#16

Re: How to hide Startmenu

  Alt 20. Okt 2008, 04:16
???

Delphi-Quellcode:
function ShowOrHideStartWndBtn(Action: Boolean): Boolean; // save Version
var
  hShellTrayWnd, hStartBtn: HWND;
begin
  Result := FALSE;
  hStartBtn := 0;

  // find the ShellTrayWindow
  hShellTrayWnd := FindWindow('Shell_TrayWnd', nil);

  // find the Start Button
  if hShellTrayWnd <> 0 then
  begin
    hStartBtn := FindWindowEx(hShellTrayWnd, 0, 'Button', nil);

    if hStartBtn <> 0 then
    begin
      Result := TRUE;
      case Action of
         TRUE: ShowWindow(hStartBtn, SW_SHOW); // now show the Button
        FALSE: ShowWindow(hStartBtn, SW_HIDE); // where is the button now?
      end;
    end;
  end;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
  ShowOrHideStartWndBtn(TRUE); // Show the Start Button
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
  ShowOrHideStartWndBtn(FALSE); // Hide the Start Button
end;
warning bad English

Zitat von Razor:
Ok i made something, please comment it and why it won't work as it should..
Delphi-Quellcode:
// ...

var // var -> def global Variable
  Form2: TForm2; // def. Form2 as any Type of TForm2
  handle1,taskBarWnd: hwnd; // def. handle1 and taskBarWnd as any Windowhandle

implementation // the section of a unit begins

uses Unit3; // include Unit3.pas

{$R *.dfm}                    // include all Resources with "dfm"-extensions

procedure tform2.hide; // define porocedure "hide" from "form2"
begin // instruction begins
  taskBarWnd := FindWindow('Shell_TrayWnd', 0); // find the window "Shell_TrayWnd"
  handle1:=FindWindowEx(taskBarWnd, 0, 'Button', 'Start'); // find in Window "Shell_TrayWnd" the Window "Button"
  closewindow(handle1); // minimizes, but does not destroy the specified window.
end; // instruction ends for porocedure "hide"
you cannot close the button !
Matti
Meine Software-Projekte - Homepage - Grüße vom Rüsselmops -Mops Mopser
  Mit Zitat antworten Zitat
Razor
(Gast)

n/a Beiträge
 
#17

Re: How to hide Startmenu

  Alt 20. Okt 2008, 14:36
@turboPASCAL > problem is that it won't work on vista!The code that you posted...

Thanks.
  Mit Zitat antworten Zitat
Razor
(Gast)

n/a Beiträge
 
#18

Re: How to hide Startmenu

  Alt 20. Okt 2008, 15:38
Zitat von jfheins:
An example ...... i can show you how to do it
(As I have no Delphi installed I dunno if it compiles ...)

First, you need a variable that holds the old WndProc. A Pointer should do the job.

To get the pointer to the WndProc you can call GetWindowLong(), to process the messages in your program, you need a seperate function
Delphi-Quellcode:
var
  OldWndProc: Pointer;

begin // Change WndProc
  OldWndProc := GetWindowLong({Handle to the Button}, GWLP_WNDPROC);
  SetWindowLong({Handle to the Button}, GWLP_WNDPROC, @NewWndProc);
end;

function NewWndProc(hWnd: HWND; uMsg: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT;
begin
  if ({The Message you want})
    // Handle Message
  else // Call old WndProc
    CallWindowProc(OldWndProc, hWnd, uMsg, wParam, lParam);
end;
Something like that

To get the Handle of the button, you can use FindWindow.

You can find additional stuff by searching for "subclassing"

Could anybody test this like if you press the button then the form will show or something.This is really new for me so i rather ask before i go in to this...
  Mit Zitat antworten Zitat
Roachford
(Gast)

n/a Beiträge
 
#19

Re: How to hide Startmenu

  Alt 20. Okt 2008, 22:59
Zitat von Razor:
Could anybody test this like if you press the button then the form will show or something.This is really new for me so i rather ask before i go in to this...
Why should we work for you? DIY...
  Mit Zitat antworten Zitat
Razor
(Gast)

n/a Beiträge
 
#20

Re: How to hide Startmenu

  Alt 20. Okt 2008, 23:05
Hahaha another guy with a bad day you know this isn't a place to toss your mind.This a FORUM read it what it means on google.
  Mit Zitat antworten Zitat
Antwort Antwort
Seite 2 von 3     12 3      


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 07:57 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz