I am trying to display a FireMonkey form on a second monitor, using C++Builder with following code:
void __fastcall ShowFormOnScreen( int OutMon )
{
MyForm->Top = 0;
MyForm->BorderStyle = bsNone;
MyForm->WindowState = wsNormal;
MyForm->Left = Screen->Monitors[OutMon]->Left;
MyForm->Height = Screen->Monitors[OutMon]->Height;
MyForm->Width = Screen->Monitors[OutMon]->Width;
MyForm->Show();
}
Unfortunately, the Screen object does not have the Monitors property, so how can do this in FireMonkey?
For windows you can use EnumDisplayMonitors to locate the second monitor.
This needs a callback function which will receive the information from each monitor found.
Example in Delphi below which displays a second Firemonkey form on the second monitor and makes the background black