Changing the [X] button, and how to tab between textboxes

Chanign the [X] button, and how to tab between textboxes

Page 1 of 1

2 Replies - 2747 Views - Last Post: 23 April 2009 - 10:48 AM Rate Topic: -----

#1 TerraEnvy  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 39
  • Joined: 07-November 08

Changing the [X] button, and how to tab between textboxes

Posted 23 April 2009 - 10:14 AM

TOPIC 1:
Okay so I have gotten pretty decent lately with using vb 20008 express but I have realized a problem.
It never mattered before but now have found that if you click the [X] in a form other than the startup form it doesnt close the whole program, just that form. Any help changing that would be great, thanks.

TOPIC 2:
I just need to know how to make it so that when you create new text boxes you can just hit tab in the program and go from text box, to text box ,to button ect...
As well as being able to hit enter and to press a button when highlighting a text box.


Any help is appreciated
-Terra

This post has been edited by TerraEnvy: 23 April 2009 - 10:15 AM


Is This A Good Question/Topic? 0
  • +

Replies To: Changing the [X] button, and how to tab between textboxes

#2 MrWobbles  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 31
  • View blog
  • Posts: 328
  • Joined: 11-April 08

Re: Changing the [X] button, and how to tab between textboxes

Posted 23 April 2009 - 10:24 AM

1) In Code View, just above where it displays your code there are 2 drop down menus - in the one on the left select (formName Events) where formName is your forms name... obviously. In the one to the right of that there should be an item called FormClosed click on it. Now set the main form to close when that form closes and you should be ok.

2)When you create the new text box in the properties window (under the Solution Explorer on the right) you can set its tabIndex, just start with 1 (being the first textbox) and continue on with 2, 3, etc... until you get to your last textbox - that will allow you to tab through them.

Enter to press a button is real easy - select your form (make sure its your form and not a control) and then in the properties window set the "AcceptButton" to the button that you want pressed when the user hits enter - also the cancel button will close the form.

I hope that clears things up for you, if you have any other questions - just ask. :)

This post has been edited by MrWobbles: 23 April 2009 - 10:24 AM

Was This Post Helpful? 0
  • +
  • -

#3 TerraEnvy  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 39
  • Joined: 07-November 08

Re: Changing the [X] button, and how to tab between textboxes

Posted 23 April 2009 - 10:48 AM

View PostMrWobbles, on 23 Apr, 2009 - 09:24 AM, said:

1) In Code View, just above where it displays your code there are 2 drop down menus - in the one on the left select (formName Events) where formName is your forms name... obviously. In the one to the right of that there should be an item called FormClosed click on it. Now set the main form to close when that form closes and you should be ok.

2)When you create the new text box in the properties window (under the Solution Explorer on the right) you can set its tabIndex, just start with 1 (being the first textbox) and continue on with 2, 3, etc... until you get to your last textbox - that will allow you to tab through them.

Enter to press a button is real easy - select your form (make sure its your form and not a control) and then in the properties window set the "AcceptButton" to the button that you want pressed when the user hits enter - also the cancel button will close the form.

I hope that clears things up for you, if you have any other questions - just ask. :)

Thank you very much, this answered all of my questions perfectly.
Can't believe I didnt think to look in the declarations drop down for closing. X_X

Again thank you so much for your help,\.

-Terra

This post has been edited by TerraEnvy: 23 April 2009 - 10:48 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1