| | |
Can some1 give me maximum of validation on....
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Sep 2007
Posts: 72
Reputation:
Solved Threads: 0
Hi ...
Can u plzz help me ..
i want to put maximum validation for each control on my form..
it contain a textbox(input only alphabets), a combo box(display only Mr,Mrs, Miss), a datagrid..
and also how do i put a tool tip text on a textbox..
Note for the combo box i have already bind it but it displays all 5 Mr 2 Mrs and Miss
i just want it to be unique i.e Mr Mrs Miss
Need Help plzzzzzzz
Can u plzz help me ..
i want to put maximum validation for each control on my form..
it contain a textbox(input only alphabets), a combo box(display only Mr,Mrs, Miss), a datagrid..
and also how do i put a tool tip text on a textbox..
Note for the combo box i have already bind it but it displays all 5 Mr 2 Mrs and Miss
i just want it to be unique i.e Mr Mrs Miss
Need Help plzzzzzzz
About ComboBox you can control the data it bound to be unique i.e if you return data from database let it distinct
About tooltip, its show method take the control it shows if the cursor came on and the string it displayes i.e ToolTip1.Show(textbox1, "this is textbox")
About a textbox(input only alphabets) in text changed handler for the textbx\richtextbox it receives the key (last one) written on the textbox\richtextbox using some Char\char class method you can check if the key written was alphabet or digits and take the decision
About tooltip, its show method take the control it shows if the cursor came on and the string it displayes i.e ToolTip1.Show(textbox1, "this is textbox")
About a textbox(input only alphabets) in text changed handler for the textbx\richtextbox it receives the key (last one) written on the textbox\richtextbox using some Char\char class method you can check if the key written was alphabet or digits and take the decision
BI Developer | LINKdotNET
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
This following code to input string only, other character wont allowed to input.
Tooltips :
drag tooltips control to your destination form then all of control has tooltips editor in their properties control. you can add text in tooltips properties (use like in vb 6).
vb.net Syntax (Toggle Plain Text)
Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress If (Microsoft.VisualBasic.Asc(e.KeyChar) < 65) _ Or (Microsoft.VisualBasic.Asc(e.KeyChar) > 90) _ And (Microsoft.VisualBasic.Asc(e.KeyChar) < 97) _ Or (Microsoft.VisualBasic.Asc(e.KeyChar) > 122) Then 'space accepted If (Microsoft.VisualBasic.Asc(e.KeyChar) <> 32) Then e.Handled = True End If End If If (Microsoft.VisualBasic.Asc(e.KeyChar) = 8) _ Or (Microsoft.VisualBasic.Asc(e.KeyChar) = 44) _ Or (Microsoft.VisualBasic.Asc(e.KeyChar) = 45) _ Or (Microsoft.VisualBasic.Asc(e.KeyChar) = 46) Then e.Handled = False End If End Sub
Tooltips :
drag tooltips control to your destination form then all of control has tooltips editor in their properties control. you can add text in tooltips properties (use like in vb 6).
Never tried = Never Know
So, Please do something before post your thread.
* PM Asking will be ignored *
So, Please do something before post your thread.
* PM Asking will be ignored *
![]() |
Other Threads in the VB.NET Forum
- Previous Thread: How to main session using in AxWebBrowser
- Next Thread: PictureBox Image.Save Error
| Thread Tools | Search this Thread |
Tag cloud for VB.NET
"crystal .net .net2005 30minutes 2008 access application arithmetic array assignment basic binary bing box button buttons c# center code combobox component connectionstring convert data database databasesearch datagrid datagridview design dissertation dissertations dissertationthesis dll dosconsolevb.net editvb.net error excel file-dialog firewall folder google hardcopy image images isnumericfuntioncall listview login math memory mobile ms mssqlbackend navigate net networking opacity output peertopeervideostreaming picturebox picturebox1 plugin port print printing problem problemwithinstallation project record reports" save savedialog serial server sorting sql string studio temp text textbox timer toolbox updown upload useraccounts usercontrol vb vb.net vb.netcode vb.nettoolboxvisualbasic2008sidebar vb2008 vbnet view visual visualbasic visualbasic.net visualstudio visualstudio2008 web wpf






