?
Solved

Display form on second monitor

Posted on 2002-05-19
7
Medium Priority
?
2,621 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 200 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
Technology Partners: 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
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 …
Suggested Courses
Course of the Month14 days, 8 hours left to enroll

770 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