Solved

Dll on Multi Screen Monitor

Posted on 2002-06-10
1
223 Views
Last Modified: 2010-08-05
My app runs on a multi screen monitor. it showed a button on the 1st and 2nd monitor,so that when you click it it knows which monitor you clicked on. Then it calls a dll, but the dll always appear on the 1st monitor, center aligned. Even if i hard code the left property of the dll form, it still shows on the 1st monitor center aligned.

How can i make the dll form show on my specified left property?  (by the way, other forms aside from dll appears correctly either on second or first monitor)
0
Comment
Question by:JPDP
[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
1 Comment
 
LVL 12

Accepted Solution

by:
Lee_Nover earned 500 total points
ID: 7069224
:)
I had this problem yesterday

I found no other (working) solution than to write a handler on the forms Activate event


var PosRect: TRect;
    FirstActivate: Boolean;

when you call your dll and display the form set it's coordinates (PosRect variable)

when the form is Activated set the coordinates :

procedure TDllForm.FormActivate(Sender: TObject);
begin
  if FirstActivate then
  begin
    FirstActivate:=false;
    SetBounds(PosRect.Left, PosRect.Top, PosRect.Right, PosRect.Bottom);
  end;
end;


I tried lots of ways with SetwindowPos from the calling process .. nothing worked
this was the only way I could get it to work
this also depends on the forms ParentWindow !
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
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.…

707 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