anchor.diff:      FWinStyleEx := 0;
     end;
   
  +  if ((WindowType = wtWindow) or (WindowType = wtModalForm)) and (waBorderLess in FWindowAttributes) then
  +    FWinStyle := FWinStyle and WS_POPUP;  // this is different to wtPopop (toolwindow, hint window) because it can steal focus like a normal form
  +
     AdjustWindowStyle;
  -
  -  if ((WindowType = wtWindow) or (WindowType = wtModalForm)) and (waBorderLess in FWindowAttributes) then
  -    FWinStyle := WS_POPUP;  // this is different to wtPopop (toolwindow, hint window) because it can steal focus like a normal form
   
     if waAutoPos in FWindowAttributes then
     begin
  
positive.code:     FTop  := TfpgCoord(CW_USEDEFAULT);
    end;
  
    if (FWindowType <> wtChild) and not (waSizeable in FWindowAttributes) then
      FWinStyle := FWinStyle and not (WS_SIZEBOX or WS_MAXIMIZEBOX);
  
    FWinStyle := FWinStyle or WS_CLIPCHILDREN or WS_CLIPSIBLINGS;
  
negative.code:   mid         := 0;
    wcname      := 'FPGWIN';
  
    if AParent <> nil then
      FParentWinHandle := TfpgGDIWindow(AParent).WinHandle
    else
      FParentWinHandle := 0;
  
    if WindowType = wtChild then
    begin
      FWinStyle   := WS_CHILD;
      FWinStyleEx := 0;
      mid         := 1;
      wcname      := 'FPGWIDGET';
    end
    else if WindowType in [wtPopup] then
    begin
      // This prevents the popup window from stealing the focus. eg: ComboBox dropdown
      FParentWinHandle := GetDesktopWindow;
      FWinStyle   := WS_CHILD;
      FWinStyleEx := WS_EX_TOPMOST or WS_EX_TOOLWINDOW;
    end
    else if WindowType = wtModalForm then
    begin
      // set parent window to special hidden window. It helps to hide window taskbar button.
      FParentWinHandle := wapplication.GetHiddenWindow;
  