Click here to Skip to main content
15,886,799 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: String length problem Pin
penguin500015-Feb-07 23:25
penguin500015-Feb-07 23:25 
Questionsecond form Pin
KOKEMO15-Feb-07 1:47
KOKEMO15-Feb-07 1:47 
AnswerRe: second form Pin
Marcus J. Smith15-Feb-07 2:13
professionalMarcus J. Smith15-Feb-07 2:13 
AnswerRe: second form Pin
jim_taylor16-Feb-07 10:21
jim_taylor16-Feb-07 10:21 
QuestionNeed Help while deployment ...Anyone please help me. Pin
Member 371873315-Feb-07 0:32
Member 371873315-Feb-07 0:32 
AnswerRe: Need Help while deployment ...Anyone please help me. Pin
nlindley715-Feb-07 6:04
nlindley715-Feb-07 6:04 
QuestionValidating characters Pin
Mark0614-Feb-07 23:50
Mark0614-Feb-07 23:50 
AnswerRe: Validating characters Pin
KeithF15-Feb-07 0:09
KeithF15-Feb-07 0:09 
Hi Mark

You can use regular expressions as far as i know to do what you want or you could use a masked textbox in .Net 2.0.

However to do what you want you need to you use the keypress event of a textbox and ignore character you dont want to allow by setting e.handled = true.

Private Sub txtText1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtText1.KeyPress

'If the key pressed is ' or " or any type of punctuation mark then do not allow
If e.KeyChar.IsPunctuation(e.KeyChar) Then
e.Handled = True
End If

End Sub

'This will ignore a backslash
If e.KeyChar = Microsoft.VisualBasic.Chr(Keys.OemBackslash) Then
e.Handled = True
End If

Hope this Helps

Keith

QuestionDynamic compilation Pin
JCSillero14-Feb-07 21:53
professionalJCSillero14-Feb-07 21:53 
AnswerRe: Dynamic compilation Pin
Dave Kreskowiak15-Feb-07 13:00
mveDave Kreskowiak15-Feb-07 13:00 
GeneralRe: Dynamic compilation Pin
JCSillero15-Feb-07 18:56
professionalJCSillero15-Feb-07 18:56 
QuestionHow 2 Fix the Form Size in Vb.Net? Pin
Parameswar Mal14-Feb-07 21:38
Parameswar Mal14-Feb-07 21:38 
AnswerRe: How 2 Fix the Form Size in Vb.Net? Pin
Ankur.Bakliwal14-Feb-07 23:48
Ankur.Bakliwal14-Feb-07 23:48 
QuestionHow to increase the Field Size in Access2003 Pin
somagunasekaran14-Feb-07 19:38
somagunasekaran14-Feb-07 19:38 
AnswerRe: How to increase the Field Size in Access2003 Pin
KeithF14-Feb-07 22:44
KeithF14-Feb-07 22:44 
QuestionProblem while deployment of Application having Crystal Report Pin
priya_p23314-Feb-07 19:12
priya_p23314-Feb-07 19:12 
QuestionAdd Checkbox to DataGridView at code behind. Pin
cheeken2u14-Feb-07 19:01
cheeken2u14-Feb-07 19:01 
AnswerRe: Add Checkbox to DataGridView at code behind. Pin
Marcus J. Smith15-Feb-07 2:06
professionalMarcus J. Smith15-Feb-07 2:06 
QuestionRe: Add Checkbox to DataGridView at code behind. Pin
priya_p23315-Feb-07 18:24
priya_p23315-Feb-07 18:24 
AnswerRe: Add Checkbox to DataGridView at code behind. Pin
Marcus J. Smith19-Feb-07 2:43
professionalMarcus J. Smith19-Feb-07 2:43 
QuestionBinding datagrid to collection class Pin
jazzyjboombox14-Feb-07 17:51
jazzyjboombox14-Feb-07 17:51 
AnswerRe: Binding datagrid to collection class Pin
Johan Hakkesteegt14-Feb-07 19:50
Johan Hakkesteegt14-Feb-07 19:50 
GeneralRe: Binding datagrid to collection class Pin
jazzyjboombox15-Feb-07 9:44
jazzyjboombox15-Feb-07 9:44 
GeneralRe: Binding datagrid to collection class Pin
Johan Hakkesteegt19-Feb-07 20:13
Johan Hakkesteegt19-Feb-07 20:13 
GeneralBinding datagrid to collection class Pin
jazzyjboombox22-Feb-07 9:50
jazzyjboombox22-Feb-07 9:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.