Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8073959
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T14:30:10+00:00 2026-06-05T14:30:10+00:00

I am trying to display a FireMonkey form on a second monitor, using C++Builder

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T14:30:12+00:00Added an answer on June 5, 2026 at 2:30 pm

    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

    // Callback function in function MonitorCount
    function MonCountCB(hm: HMONITOR; dc: HDC; r: PRect; l: LPARAM): Boolean; stdcall;
    var
      mInfo : MonitorInfoEx;
    //  SecondaryRect: RECT;
    begin
    
      minfo.cbSize := sizeof(mInfo);
      GetMonitorInfo(hm, @mInfo);
    
      if mInfo.dwFlags <> MONITORINFOF_PRIMARY then
      begin
         MonitorForm.Left := mInfo.rcWork.Left;
         MonitorForm.Top := mInfo.rcWork.Top;
         MonitorForm.Width := mInfo.rcWork.Width;
         MonitorForm.Height := mInfo.rcWork.Height;
      end;
    
      inc(Integer(pointer(l)^));
      result := true;
    end;
    
    
    procedure TForm1.CornerButton1Click(Sender: TObject);
    var
      MonitorCount : Integer;
    begin
      EnumDisplayMonitors(0,nil,MonCountCB, Integer(@MonitorCount));
      MonitorForm.Viewport3D1.Color := TAlphaColors.Black;
      MonitorForm.Show;
    end;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to display current time with PHP (using this ): $date = date('m/d/Y h:i:s
I'm trying to display an svg graph with associated javascript in my application using
I'm trying to display images using my web application written in Rails. I've come
Im trying to display a loading gif before submitting a multipart-form (file upload), this
I'm currently trying to develop a project based upon Firemonkey. I'm using Firemonkey for
Im trying to display the words from an array in 1 second interval. I
im trying to display things inline using css that should be right next to
I'm trying to display a list of labels and inputs using JQuery Mobile so
I am trying to display a modal viewController in an iPad app using the
I am trying to display an .svg file in a HTML page using jQuery

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.