Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Visual Basic
Expertise: Beginner
Sep 28, 1998

Better Auto-Propercase

The "Auto-Propercase Text Box at Entry" tip [VBPJ May 1997, page 63] has a simpler solution. The StrConv function can propercase any string. You can achieve the same effect with this code in the KeyUp event of a text box:

 Private Sub Text1_KeyUp(KeyCode As Integer, _
	Shift As Integer)
	Dim iCurPos As Integer
	iCurPos = Text1.SelStart
	Text1.Text = StrConv(Text1, vbProperCase)
	Text1.SelStart = iCurPos
End Sub
Manish Garg
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date