I use Delphi 10 and I have two monitors when I create default vcl application and run the application the main form always appear in the first monitor is there a way to make it appear in the second monitor by default ?
This may be option in the IDE or property or code
Thanks
TForm
has a DefaultMonitor
property that is set to dmActiveForm
by default. When no Form is active, the primary monitor is used. However, there is no way to set the DefaultMonitor
to the second monitor specifically.
TForm
also has a Monitor
property, but for whatever reason it is read-only.
So, to display a TForm
on a specific monitor, you can locate the desired monitor in the global TScreen.Monitors[]
list, and then either:
manually set the Form's Left
/Top
properties to an X/Y coordinate that is within the bounds of the monitor's BoundsRect
or WorkareaRect
property.
pass the monitor to the Form's public MakeFullyVisible()
method.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With