Ver Mensaje Individual
  #2  
Antiguo 10-10-2016
cocute cocute is offline
Miembro
 
Registrado: nov 2008
Posts: 403
Reputación: 16
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
    
FPreviousBoundsRectTRect;
    
procedure FlipFullScreen;
    ....
  public
    ....
  
end;

implementation

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

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