Ver Mensaje Individual
  #2  
Antiguo 10-10-2016
cocute cocute is offline
Miembro
 
Registrado: nov 2008
Posts: 403
Reputación: 18
cocute Va por buen camino
Ya he encontrado solución con este código de ejemplo funciona perfecto en win10 x64:

Código PHP:
TForm1 = class(TForm)
    ....
  protected
    
FPreviousBoundsRect: TRect;
    
procedure FlipFullScreen;
    ....
  public
    ....
  
end;

implementation

procedure TForm1
.FormCreate(Sender: TObject);
begin
  FPreviousBoundsRect 
:= BoundsRect;
end;

procedure TForm1.FlipFullScreen;
var
  
WindowStyle: NativeInt;
begin
  WindowStyle 
:= GetWindowLong(Handle, GWL_STYLE);
  if ((
WindowStyle and WS_OVERLAPPEDWINDOW) > 0) then
  begin
    FPreviousBoundsRect 
:= BoundsRect;
    
BoundsRect := Screen.MonitorFromWindow(Handle).BoundsRect;
    
SetWindowLong(Handle, GWL_STYLE, WindowStyle and (not WS_OVERLAPPEDWINDOW));
  
end else
  
begin
    SetWindowLong
(Handle, GWL_STYLE, WindowStyle or WS_OVERLAPPEDWINDOW);
    
BoundsRect := FPreviousBoundsRect;
  
end;
end; 
Responder Con Cita