DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2007

    Exclamation Console in VB.NET "X" button handler

    I am writing a stupid console app just to see how it works. I can not figure out how to create a handler for the close button. I want to stop loops and close othe running apps when the "X" button is clicked on the console. I have searched around and can't find anything that looks like it will work. Please Help.

  2. #2
    Join Date
    Nov 2003
    Portland, OR
    Console apps are not event-driven, so there's no way to create a handler. When the console window is closed, the app is terminated and your loops, etc. will stop automatically.
    Phil Weber

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

  3. #3
    Join Date
    Feb 2007
    ok, thank you.
    I wanted to close the COM port before it exited, but oh well.

Similar Threads

  1. Replies: 12
    Last Post: 03-09-2010, 09:51 AM
  2. Replies: 1
    Last Post: 01-10-2007, 10:55 AM
  3. vb.net and game console
    By Mischa in forum .NET
    Replies: 0
    Last Post: 12-15-2006, 06:39 AM
  4. An unusal issue with SPIN BUTTON
    By vipin_pc in forum VB Classic
    Replies: 8
    Last Post: 11-17-2006, 02:22 PM
  5. VB.NET: 3 points of view
    By David Kroll in forum .NET
    Replies: 33
    Last Post: 02-13-2001, 10:23 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.