Solved

Display form on second monitor

Posted on 2002-05-19
7
2,484 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
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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 

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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

778 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