Solved

Display form on second monitor

Posted on 2002-05-19
7
2,419 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
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 

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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

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…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

746 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now