Hello Everybody,
I got another problem as always
I know how to convert a string or text of textbox to Propercase
But the problem is that when some words like "in" "is" , etc. comes they should not be converted to propercase
How do I do that
Thanks for any help
Proper Case in vb.net
Page 1 of 12 Replies - 215 Views - Last Post: 26 July 2012 - 10:54 PM
Replies To: Proper Case in vb.net
#2
Re: Proper Case in vb.net
Posted 26 July 2012 - 10:36 PM
How are you capitalising? Are you splitting the string at the spaces and then capitalising those individually? Could I see the code please, so that I can understand the way you're doing it and then find the best way to change the code round.
#3
Re: Proper Case in vb.net
Posted 26 July 2012 - 10:54 PM
ya sure
I call it from the module
I call this code in textchange event of textbox
Thanks for your reply
I call it from the module
Module modProperCase
Public Sub ProperCaseTextChanged(ByVal sender As Object)
Dim x As TextBox = CType(sender, TextBox)
Dim sel_Start As Integer
Dim sel_Length As Integer
sel_Start = x.Selectionstart
sel_Length = x.SelectionLength
x.Text = StrConv(x.Text, VbStrConv.ProperCase)
x.Selectionstart = sel_Start
x.SelectionLength = sel_Length
End Sub
End Module
I call this code in textchange event of textbox
Thanks for your reply
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote



|