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. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |