VB中Exit try及CheckBox的lost-focus事件简介

前端之家收集整理的这篇文章主要介绍了VB中Exit try及CheckBox的lost-focus事件简介前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

Exit Try

立即退出所在的 Try 或 Catch 块。 如果存在 Finally 块,则将继续执行该块;否则,将继续执行 End Try 语句之后的语句。 只能在 Try 或 Catch 块内使用 Exit Try,不能在 Finally 块内使用它。

---------

Q: Iwould like to disable a checkBox from focusing,so that even user tabbed to orclicked on that checkBox,the checkBox still would not accept the focus,andthe focus remains where it prevIoUsly is.

Possible? Thanks...

A1: Ifyou want to skip the control while tabbing,use control's TabStop property andset it to false. Still,if clicked with mouse,it will still get focus. If youwant to disable the checkBox,set it's Enabled property to false. And in caseyou don't want to disable the checkBox but still don't want it to take focus,use it's GotFocus event to set Focus to any else control.

A2: ActuallyI would like to prevent prevIoUsly focused control to issue lost-focus event.

But,that seems impossible. So,I wouldlike to try different approach to solve the problem.

Anyway,thank you all.

猜你在找的VB相关文章