View Single Post
  #3  
Old 29-02-2020, 22:08
Cesar82's Avatar
Cesar82 Cesar82 is offline
Registered User
 
Join Date: May 2011
Location: Brazil
Posts: 1,074
Thanks: 1,814
Thanked 2,304 Times in 787 Posts
Cesar82 is on a distinguished road
try
Code:
[ code]
const
  GWL_HWNDPARENT = (-8);
  GWL_EXSTYLE = (-20);
  WS_EX_TOOLWINDOW = $80;

function GetWindowLong(hWnd, nIndex: Integer): Longint;
  external 'GetWindowLongW@user32 stdcall delayload';

function SetWindowLong(hWnd: HWND; nIndex: Integer; dwNewLong: Longint): Longint;
  external '[email protected] stdcall delayload';

function ShowWindow(hWnd: Integer; uType: Integer): Integer;
  external '[email protected] stdcall delayload';

procedure InitializeWizard();
var
  hWindow: HWND;
begin
  hWindow := GetWindowLong(MainForm.Handle, GWL_HWNDPARENT);
  SetWindowLong(hWindow, GWL_EXSTYLE, GetWindowLong(hWindow, GWL_EXSTYLE) or WS_EX_TOOLWINDOW);
  ShowWindow(hWindow, SW_HIDE);
end;
Reply With Quote
The Following User Says Thank You to Cesar82 For This Useful Post:
Gehrman (01-03-2020)