wantime
asked on
Delphi2010: Dual Monitor Problem -- why is sub Form hiden?
hello all,
i have an application which have a main form and a sub form.
if the application is started, main form and sub form will be displayed, the sub form is displayed over the main form.
it works great on dual monitor of mine and other customer's.
but one customer has problem with his dual monitor. When he starts the application, the sub form is hiden behind the main form. Only by using "Alt + Tab" can this sub form be invoked and displayed again.
any suggestion?
thanks,
wantime
i have an application which have a main form and a sub form.
if the application is started, main form and sub form will be displayed, the sub form is displayed over the main form.
it works great on dual monitor of mine and other customer's.
but one customer has problem with his dual monitor. When he starts the application, the sub form is hiden behind the main form. Only by using "Alt + Tab" can this sub form be invoked and displayed again.
any suggestion?
thanks,
wantime
I don't see the relation between dual monitor and the problem.
If I understood you have a form hidden behind another. That could apply to only one monitor.
Please tell us more about the way you create and display your forms (is the sub form modal ?)
check here as there are a couple good things to try
http://stackoverflow.com/questions/21749/multiple-form-delphi-applications-and-dialogs
If I understood you have a form hidden behind another. That could apply to only one monitor.
Please tell us more about the way you create and display your forms (is the sub form modal ?)
check here as there are a couple good things to try
http://stackoverflow.com/questions/21749/multiple-form-delphi-applications-and-dialogs
you can try to set the following properties as well
SubForm.DefaultMonitor := dmActiveForm;
SubForm.FormStyle := fsStayOnTop;
ASKER
the problem is still there.
the codes is attached here.
The Problem i met is in Step 5:
Step 1. start the application in a computer which has dual monitor.
Step 2. the forms are displayed correctly.
Step 3. close the form with name "Form2".
Step 4. move the "Form1" with mouse from left monitor to right monitor.
Step 5. the "Form2" is displayed again! and "Form2" could not be closed per mouse click, i must close it with ctrl-alt-del.
this application works great in my dual monitor and also by other people, but just by few people it has problem above.
any idea? thanks.
monitor.zip
the codes is attached here.
The Problem i met is in Step 5:
Step 1. start the application in a computer which has dual monitor.
Step 2. the forms are displayed correctly.
Step 3. close the form with name "Form2".
Step 4. move the "Form1" with mouse from left monitor to right monitor.
Step 5. the "Form2" is displayed again! and "Form2" could not be closed per mouse click, i must close it with ctrl-alt-del.
this application works great in my dual monitor and also by other people, but just by few people it has problem above.
any idea? thanks.
monitor.zip
ASKER
i wonder why the method Formactivated was invoked, when the main form is moved to another monitor.
are there any way to prevent that happened?
are there any way to prevent that happened?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
it works.
ASKER
it will be also appreciate, if one knows how to change the configuration of monitors and let it work, without any change in source codes.