Find Code:
All Words
Any of the Words
Exact Phrase
Home
:
Code
:
Forums
:
Submit
:
Mailing List
:
About
:
Contact
Code
All
VB.NET
ASP.NET
C#
VB Classic
ASP Classic
Snippets
Popular
Resources
Submit Code
Forums
Articles
Tips
Links
Books
Contest
Link to us
Disables or enables Textbox
Author:
Muhammad Imran Vohra
E-mail:
Click to e-mail author
Website:
http://www.geocities.com/adnysam
Submitted:
3/13/2005
Version:
VB6
Compatibility:
VB5, VB6
Category:
Controls
Views:
10970
This is very usefull for programers to disable or enables control (textbox, label datepicker or much more) Text1_keypress(keyascii as integer) keyascii = deccontrol(keyascii, text1, 2)
Declarations:
'none
Code:
Public Sub Disables(X As Form) Dim C As Control For Each C In X.Controls If TypeOf C Is TextBox Or TypeOf C Is ComboBox Or TypeOf C Is SSOleDBCombo Or TypeOf C Is OptionButton Or TypeOf C Is DTPicker Or TypeOf C Is MaskEdBox Then C.Enabled = False End If Next End Sub Public Sub Enables(X As Form) Dim C As Control For Each C In X.Controls If TypeOf C Is TextBox Or TypeOf C Is ComboBox Or TypeOf C Is SSOleDBCombo Or TypeOf C Is OptionButton Or TypeOf C Is DTPicker Or TypeOf C Is MaskEdBox Then C.Enabled = True End If Next End Sub
Home
|
Forums
|
Submit
|
Books
|
Mailing List
|
Advertising
|
About
|
Contact
© 2024 A1VBCode. All rights reserved.
Legal disclaimer & terms of use
Privacy statement