View Review Details
| Book: |
|
Visual Basic Controls in a Nutshell |
| Subject: |
|
Oh yeah? |
| Date: |
|
2007-06-29 10:54:16 |
| From: |
|
Lynn Bennett
|
|
|
Evan Dictor mentions his first experience writing an application in VB. He immediately ran into trouble with the behavior of text boxes, the
LostFocus event, and control validation. After asking other developers a lot of questions, he
realized there was little understanding, even among seasoned developers. This experience led
him to write the book. But when he covered these very topics, he got it wrong!
The CausesValidation property of a control has nothing to do with the validation event of that
control. You set the CausesValidation property to True on any control that can receive the
focus IF YOU WANT TO VALIDATE THE CONTROL THAT WILL LOSE THE FOCUS! This seems counter-
intuitive, but this is how Microsoft designed it.
Mr. Dictor also got "order of events" wrong. (Actually, I haven't found a single resource that
got it right.) When instantiating a form, the Form_Load event always fires before the
Form_Initialize event.
Overall, Evan Dictor has done a great job documenting little known caveats of VB controls. I couldn't have completed my first and only VB project without it. (I'm a C-soned developer :-) Thanks,
Mr. Dictor and O'reilly.
|
|
| |