Solved

Problems with DialogBox (ShowModel)

Posted on 1997-10-03
3
208 Views
Last Modified: 2010-04-04
I have a dialogbox which is displayed by the MainForm. And in a second thread I set the ShowModel.Result to mrOk. The dialogbox should disapeare now. But it wont. I have to move the mouse cursor first befor the dialogbox disapers.

How can I get rid of this effect?
Points will be increased depending on your answer.

Regards Ian
0
Comment
Question by:e4monsch
3 Comments
 
LVL 3

Expert Comment

by:mirek071497
ID: 1346796
If you set ModalResult to mrOK the dialog box disapeare and this is ok. Can't you move cursor before setting ModalResult ? I can't understand what you need.
0
 
LVL 2

Author Comment

by:e4monsch
ID: 1346797
The problem is that the dialog box does not disapere by it self, when I set the ModalResult to mrOK. I have to move the mouse cursor (after setting mrOK) to help the dialog box to disapere.

Do you know what I mean?
0
 

Accepted Solution

by:
Dippen earned 30 total points
ID: 1346798
Hi!

I haven't been able to reconstruct your problem, but you could try to update the form in question:

  ModalResult := mrOK;
  Modalform.Update;    <--- The form that won't disappear

  or try to update the Mainform:

  Mainform.Update;

As I said, I haven't been able to reconstruct your problem, so my theory is not actually tested.

//Dippen


0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

911 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

22 Experts available now in Live!

Get 1:1 Help Now