Ver Mensaje Individual
  #2  
Antiguo 21-01-2006
Avatar de jmariano
jmariano jmariano is offline
Miembro
 
Registrado: jul 2005
Posts: 376
Reputación: 19
jmariano Va por buen camino
Bueno, después de buscar por ahí encontré el código siguiente que puede serte de ayuda:

Para ocultar el menú (o botón) de inicio:
Código Delphi [-]
var
  h : hwnd;
begin
  h := FindWindowEx(FindWindow('Shell_TrayWnd', nil), 0, 'Button', nil);
  ShowWindow(h, 0);
  Windows.SetParent(h, 0);
end;

Para volver a restablecerlo:
Código Delphi [-]
var
  h : hwnd;
  TaskWindow: hwnd;
begin
  h := FindWindowEx(Getdesktopwindow, 0, 'Button', nil);
  TaskWindow := FindWindow('Shell_TrayWnd', nil);
  Windows.SetParent(h, TaskWindow);
  ShowWindow(h, 1);
end;

Para sustituirlo por uno propio:
Código Delphi [-]
var
  b: TButton; // u otro tipo de Botón que puede contener un Bitmap
  h: hwnd;
begin
  h := FindWindow('Shell_TrayWnd', nil);
  b := TButton.Create(nil);
  b.ParentWindow := h;
  b.Caption := 'Inicio';
  b.Width := 60;
  b.font.style := [fsbold];
end;

(Verás que el secreto está en capturar la ventana de sistema "Shell_TrayWnd", que representa la barra de inicio).

Saludos!

Última edición por jmariano fecha: 21-01-2006 a las 15:05:01.
Responder Con Cita