Create Form (or Top control) that accept mousedown event but don't get focus. lazarus / 31-LCL ---------------------------------------------------------------------- dmitryb · 2018-09-18 04:06 Hello I need to create dropdown window for my custom combobox. How can I create Form (or Top control) that accept mousedown event but don't get focus. In Delphi I used Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TPopupInactiveFormEh.WMMouseActivate(var Message: TWMMouseActivate);begin  Message.Result := MA_NOACTIVATE;end; for forms or Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TPopupListboxEh.CreateParams(var Params: TCreateParams);   Params.WndParent := GetDesktopWindow; function TPopupListboxEh.CanFocus: Boolean;begin  Result := False;end; for child controls No WM_MOUSEACTIVATE work. Doesn't work at all in Lazarus. No GetDesktopWindow in Linux GTK. Crossplatform solution needed. ---------------------------------------------------------------------- jamie · 2018-09-18 21:12 There is a csNoFocus  setting  for the Tcontrol.ControlStyle. docs state it will not receive focus if that is set... ---------------------------------------------------------------------- dmitryb · 2018-09-19 07:00 Hello jamie When setting this parameter, I do not see any effect of selecting Form or focusing control. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TForm2.FormCreate(Sender: TObject);begin  ControlStyle := ControlStyle + [csNoFocus];end; constructor TMyControl.Create(Owner: TComponent);begin  inherited Create(Owner);  ControlStyle := ControlStyle + [csNoFocus];end;  Teseted in Win32(Windows10) and GTK2(Ubuntu 18.04.1).