Results 1 to 3 of 3

Thread: [RESOLVED] ShowDialog() Issue/Question

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jun 2008
    Posts
    159

    Resolved [RESOLVED] ShowDialog() Issue/Question

    Hello all,

    I have a class library that I use for performing updates on applications. I have two forms in the library. The first form is shown using ShowDialog and runs a Backgroung worker to check for updates and update the form interface.

    If a new update is found I open another dialog box (showing the information on What's new). This all works fine except that the second dialog box will NOT show in front. It shows minimized to the task bar every time.

    Is there a way to get it to come to the front? I've tried bringtofront, topmost and nothing works.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: ShowDialog() Issue/Question

    Are you displaying the last form on the same thread as the other two or different. If you're displaying it in the DoWork event then that's on a different thread and that would likely be at least part of your problem.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jun 2008
    Posts
    159

    Re: ShowDialog() Issue/Question

    Yep, it was running the second form from a background worker (DoWork). I swapped the from to be launched from a separate thread in the DoWork and it resolved the problem. Thanks for the tip!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width