Menu In Title Bar Application Icon lazarus / 34-Windows ---------------------------------------------------------------------- guest60499 · 2018-08-03 17:22 Hello, I'm afraid I don't really know what to call this. It is popular especially with terminal applications. The user clicks on the icon in the upper left of the application window in the title bar and there are various options. How are those set, and what is this menu called? Cheers,     guest ---------------------------------------------------------------------- Handoko · 2018-08-03 17:31 PopupMenu, you can find it in the "Standard" tab on the component toolbar. It is the second item from the left. How to use it? Drop a TPopupMenu on the form, double click it and set items for it. Then link it to the form using Object Inspector. TForm has a property called "PopupMenu". Try it, it's not hard. Sorry, I was wrong. I think what you meant is TForm.BorderIcons. You can remove some items but can't add your own items there (in Linux). ---------------------------------------------------------------------- guest60499 · 2018-08-03 18:54 BorderIcons gave me the lead I needed. From the Delphi documentation, removing biSystemMenu removes the application icon from the title bar which is what contains the menu I am speaking of. Searching for variations of "Windows system menu Delphi/FPC" isn't as helpful as one would hope. ---------------------------------------------------------------------- ASerge · 2018-08-03 19:11 Quote from: guest on August 03, 2018, 07:22:06 pmHow are those set, and what is this menu called? System menu. Set by system. Can be changed by program. Example: 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 unit Unit1; {$mode objfpc}{$H+} interface uses  Classes, SysUtils, Forms, Controls, LMessages; type  TForm1 = class(TForm)    procedure FormCreate(Sender: TObject);  private    procedure WMSysCommand(var Msg: TLMSysCommand); message LM_SYSCOMMAND;  end; var  Form1: TForm1; implementation {$R *.lfm} uses Windows; const  CMenuId = 100; procedure TForm1.FormCreate(Sender: TObject);const  CInsertPosition = 0;  CNewMenuItem = 'New menu item';var  Mnu: HMENU;  R: TMenuItemInfoW;begin  Mnu := GetSystemMenu(Handle, False);  if Mnu <> 0 then  begin    ZeroMemory(@R, SizeOf(R));    R.cbSize := SizeOf(R);    R.fMask := MIIM_STRING or MIIM_ID;    R.wID := CMenuId;    R.dwTypeData := CNewMenuItem;    if InsertMenuItemW(Mnu, CInsertPosition, True, @R) then      DrawMenuBar(Mnu);  end;end; procedure TForm1.WMSysCommand(var Msg: TLMSysCommand);begin  inherited;  if Msg.CmdType = CMenuId then  begin    Application.MessageBox('My menu item clicked. Menu reset to default.', 'Info');    GetSystemMenu(Handle, True);    Msg.Result := 0;  end;end; end.