Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 2010 > Visual Basic 2010 General Discussion
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Visual Basic 2010 General Discussion For any discussions about Visual Basic 2010 topics which aren't related to a specific Wrox book
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Basic 2010 General Discussion section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 24th, 2014, 09:05 AM
Authorized User
Points: 173, Level: 3
Points: 173, Level: 3 Points: 173, Level: 3 Points: 173, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Dec 2004
Location: , , .
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Angry (Advanced) Close window opened in another thread


I use an additional thread (thread_2) in my code to set a boolean variable which is periodically sampled and closes the main thread if true. The user interface for the thread_2 is a MsgBox which pops up at the beginning of the main thread - and should be pressed if the user wants to stop the main thread.

When the main thread finishes, thread_2 is killed (t.abort; t = Nothing), but the MsgBox does not disappear, so the user has to press the MsgBox anyway.

Question: How do I kill the msg box when the main thread finishes ?

I tried using a "normal" window (with a button) to do the same thing, but I couldn't close it from the main thread either.

Any ideas ?

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Close a Form when already Opened in C# akumarp2p C# 1 December 4th, 2006 09:45 PM
closed parent window when opened child window jaiwin Javascript How-To 0 October 8th, 2006 12:54 PM
How to close database opened by adodc aa_azadeh Pro VB Databases 1 September 28th, 2004 08:04 AM
Advanced .NET: Background thread termination tbrummel VS.NET 2002/2003 0 October 11th, 2003 12:55 PM
How do i close pop-up window?: window.close () Burton HTML Code Clinic 2 September 8th, 2003 05:40 AM

All times are GMT -4. The time now is 08:15 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.