p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Stephens' Visual Basic Programming 24-Hour Trainer (http://p2p.wrox.com/forumdisplay.php?f=621)
-   -   13 - try it example (http://p2p.wrox.com/showthread.php?t=88072)

Cia9410 July 22nd, 2012 06:53 PM

13 - try it example
 
Two questions:

1. how do you move the focus to the calculate button (NewItemForm) after user has entered value in text box "Quantity" and hits the Tab key? On my attempt, you hit Tab and it goes to the next text box which is where your calculated value should be.

2. on my attempt, program runs fine through all the steps up through "btnOK" event handler but then it just dies at "End Sub" line and never goes back to main form so values are not dropped onto the listview. I used debugger to step through the process in the downloaded solution that I got from the Wrox website and it sure looks like the code is the same and the properties on key controls are the same. After working with the original code in debugger for about 20 minutes it started doing the same thing; stopping at the end of btnOK routine.

Shut down, brought up a fresh copy of 13 TryIt and it worked fine. Is VB this sensitive?

Rod Stephens July 23rd, 2012 05:11 PM

Quote:

1. how do you move the focus to the calculate button (NewItemForm) after user has entered value in text box "Quantity" and hits the Tab key? On my attempt, you hit Tab and it goes to the next text box which is where your calculated value should be.
Probably you just need to set the tab order. Open the form in the form designer. Then select the View menu's Tab Order command. It should show numbers indicating the controls' tab order.

Click on the controls in the order in which you want the tab key to move through them. When you're done, press Esc.

If you don't use accelerators on labels (like the underlined F in File in many applications), then the labels won't affect the tab order so you don't need to click on them if you don't want to.

Quote:

Shut down, brought up a fresh copy of 13 TryIt and it worked fine. Is VB this sensitive?
I'm not sure what that's all about. If you email me the project I'll take a look and see if it's anything I can find. Normally all of the VB versions I use are pretty stable.

This may depend on the version you're running. If you're running one of the pre-release versions such as the current early preview of VB 2012, there are sometimes issues like this where a program may hang unexpectedly. Normally, however, the released products are pretty good. Be sure to keep current with the service packs.

Occasionally something happens that makes VB a bit unstable. If that happens, restart and it should clear up.

Sorry I can't give you a more definitive answer.


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

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