Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Modal Pop Up Form loses Focus

Modal Pop Up Form loses Focus

Modal Pop Up Form loses Focus


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


RE: Modal Pop Up Form loses Focus

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).

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!



Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close