Ver Mensaje Individual
  #2  
Antiguo 28-02-2012
Avatar de ecfisa
ecfisa ecfisa is offline
Moderador
 
Registrado: dic 2005
Ubicación: Tres Arroyos, Argentina
Posts: 10.508
Reputación: 36
ecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to behold
Hola madiazg.

Hice este código de prueba para Windows Vista y funciona correctamente:
Código Delphi [-]
...
implementation

const
   TASKBTITLE = 'Shell_TrayWnd';

function FindWindowEx(Parent, Child: HWND; ClassName: Pointer; 
  WindowName: PWideChar): HWND; stdcall; external 'user32.dll' name 'FindWindowExW';

function GetHeightWnd(const AName: string) : integer;
var
  Hnd:HWND;
  R : TRect;
begin
  Hnd:= FindWindow(PChar(AName), nil );
  if Hnd <> 0 then
    GetWindowRect(Hnd, R);
  Result:= R.bottom - R.top
end;

procedure ShowHideTaskBAndStartBtn(const Show: Boolean);
begin
  if Show then
  begin
    ShowWindow(FindWindow(TASKBTITLE, nil), SW_SHOW); // muestra TaskBar
    ShowWindow(FindWindowEx(0, 0, MAKEINTATOM($C017), nil), SW_RESTORE)  // muestra StartButton
  end
  else
  begin
    ShowWindow(FindWindow(TASKBTITLE, nil), SW_HIDE);  // oculta TaskBar
    ShowWindow(FindWindowEx(0, 0, MAKEINTATOM($C017), nil), SW_HIDE)  // oculta StartButton
  end
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
  BorderStyle:= bsNone;
  WindowState:= wsMaximized
end;

procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X,
  Y: Integer);
begin
  if Y >= Height - GetHeightWnd(TASKBTITLE) then
   ShowHideTaskBAndStartBtn(True)
  else
    ShowHideTaskBAndStartBtn(False);
end;

...

(* ¡ No olvides mostrar TaskBar y StartButton al salir ! *)
procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
  ShowHideTaskBAndStartBtn(True)
end;
El problema es que para mostrar/ocultar el botón de inicio es diferente en Vista que en XP. Buscando un poco encontré estas opciones para XP:Sólo tendrías que probar reemplazando el código correspondiente al botón de inicio por el de los enlaces.


Saludos.
__________________
Daniel Didriksen

Guía de estilo - Uso de las etiquetas - La otra guía de estilo ....
Responder Con Cita