Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Dll on Multi Screen Monitor

Posted on 2002-06-10
1
Medium Priority
?
229 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 1500 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

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
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…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses

636 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