The main form of the IDE is Application.MainForm. My package for quick testing:
procedure DoStuff(Form: TCustomForm);
var
S: string;
begin
S := Form.Caption;
Form.Caption := S + ' - this one';
try
ShowMessage(Format('%s [%s] on monitor %d', [Form.Name, Form.ClassName, Form.Monitor.MonitorNum]));
finally
Form.Caption := S;
end;
end;
initialization
DoStuff(Application.MainForm);
In my case, “AppBuilder [TAppBuilder] is displayed on monitor 0”, and I can see the suffix “- this” in the main form caption. What does not seem to work in your case?
source
share