Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 2010 > Visual Basic 2010 General Discussion
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old February 24th, 2014, 09:05 AM
Authorized User
Join Date: Dec 2004
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 ?


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

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