Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi all -

 

I'm currently trying to research a few quick things I am trying to implement, and while I continue - I thought there may be a faster turnaround time if I just post my questions here.

 

1. In VB.NET how do you tap into the program exit event? I want to code a few things to happen whenever the program is exited or terminated.

 

2. I have 2 text box fields that I want to have a sort of 'or' relationship. i.e. when somebody enters data into one, the other is disabled - and vice versa. I'm not sure what the best event is to do this - whether it's on entry, or leaving, etc. I was wondering what the best method for doing this was.

 

Thanks for any help anybody can supply!

 

-Falcon

  • Moderators
Posted

1. You can use Closing or Closed, most of your cleanup can be done in Closing, of course it is triggered first.

 

2. there are a few to use, it really depends on you want to handle this, you can use enter, keypress, or even one of the mouse events. For this one I wouldn't use the Leaving event, because the user should be aware that that textbox (the one you will hide) is no longer available as he either types or enters the txtbox he's in. I think I would use the TextChanged event.

 

What's best is it depends on you.

Visit...Bassic Software
Posted

Robby - thanks a lot! I know that seemed simple, but the advice for the TextChanged event really got me going in the right direction.

 

I've figured out both of my problems. Thanks!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...