Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Modal Pop Up Form loses Focus

Status
Not open for further replies.

Moss100

Technical User
Aug 10, 2004
586
GB
Hello,

Please can someone help?

Due to Outlook being offline in the UK for large parts of this week, I have had to revert back to using CHILKAT so send emails.

One problem with Chilkat is that it locks up the system for a few seconds whilst the email is sent. This generally is not a big issue, however if an email is sent with attachments, then after around 10 seconds the email form (which is pop up and modal) disappears under the form below (i guess for some reason it is losing focus).

I have tried putting me.focus at the end of the code, but this does not help.

Are there any suggestions how to stop the form losing focus (or disappearing to the back) - or at least to get the form back to the front.

Many thanks

Mark
 
My immediate response is: refresh the .setfocus periodically.
In the form time event - set the timer to say 5 seconds, and in the timer event use 'Me.SetFocus' or 'Me.Visible = True' (if you have no controls on the form).
Simple.

However, this feels messy, so, would I be wrong in directing you to the DoEvents function?

I don't know - go look at DoEvents and have a play!

ATB,

Darrylle
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top