Solved

Display form on second monitor

Posted on 2002-05-19
7
2,569 Views
Last Modified: 2013-11-13
I have a W2K PC with 2 screens.  The first is my main default display (21").  The second is a 15" touch screen.  I want my delphi application to run by default on the second screen for testing it.  The DefaultMonitor property does not seem to allow for this.
0
Comment
Question by:akb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 9

Accepted Solution

by:
ginsonic earned 50 total points
ID: 7020847
Is simple . Just add at left property the width of the first screen .

For example :

  Left := 1024; // if you screen use 1024x768;
  Top  := 0;

In this case will run on ) point of the second monitor
 
0
 
LVL 9

Expert Comment

by:ginsonic
ID: 7020848
I use it in couple applications and work .
0
 
LVL 9

Expert Comment

by:ginsonic
ID: 7020858
Sorry :

Is simple . Just add at left property the width of the first screen .

For example :

 Left := 1024; // if your screen use 1024x768 resolution;
 Top  := 0;

 For width and height use normal values without add 1024 ( for this case ).
 
 Height := 600;
 Width  := 800;

 //Just for example .

In this case will run on (0,0) point of the second monitor and will show a form with 800x600 dimensions .
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Expert Comment

by:delpro
ID: 7021286
Try the following

set the Position property to poDesigned

Then in the FormCreate

procedure TForm1.FormCreate(Sender: TObject);
begin
Form1.Left := Screen.Width;
end;
0
 
LVL 13

Author Comment

by:akb
ID: 7023015
Thanks.  Also, is there any way to test for the second monitor and pickup it's size?
0
 

Expert Comment

by:MaciejWojciechowski
ID: 32631911
var
  m: TMonitor;
begin
  if Screen.MonitorCount > 1 then
    begin
    m := Screen.Monitors[1];
    -------- m.Left --> left position of second monitor
    -------- m.Width  --> width in pixels of second monitor
    -------- m.Height --> height in pixels of second monitor

    ....
    end;
end;
0
 

Expert Comment

by:smkmalang
ID: 39646816
Thank, for your help..
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question