Formating of textbox stopped working
Formating of textbox stopped working
Formating of textbox stopped working
Formating of textbox stopped working
Formating of textbox stopped working
Formating of textbox stopped working Formating of textbox stopped working Formating of textbox stopped working Formating of textbox stopped working Formating of textbox stopped working Formating of textbox stopped working Formating of textbox stopped working Formating of textbox stopped working
Formating of textbox stopped working Formating of textbox stopped working
Formating of textbox stopped working
Go Back  Xtreme Visual Basic Talk > > > Formating of textbox stopped working


Reply
 
Thread Tools Display Modes
  #1  
Old 06-13-2013, 01:19 PM
RM33 RM33 is offline
Newcomer
 
Join Date: Jan 2013
Posts: 20
Default Formating of textbox stopped working


I am using VB 2010.

In a custom control, I am using:

CType(sender, TextBox).Text = CType(sender, TextBox).Text.ToUpper

to turn the text in the textbox to upper class letters. When I use the intermediate box and look at CType(sender, TextBox).Text.ToUpper I see it turn the letters to upper case. However, CType(sender, TextBox).Text = will not take the upper letters.

Has anyone seen a problem like this? I don't understand why the code above will not turn letters into uppercase.
Reply With Quote
  #2  
Old 06-13-2013, 04:59 PM
Gruff's Avatar
GruffFormating of textbox stopped working Gruff is offline
Bald Mountain Survivor

Retired Moderator
* Expert *
 
Join Date: Aug 2003
Location: Oregon, USA - deceased
Posts: 6,440
Default

Possibly because you are trying to use the wrong mechanism.
Code:
Public Class Form1 Private Sub TextBox1_KeyPress(sender As Object, e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress e.KeyChar = CChar(e.KeyChar.ToString.ToUpper) End Sub End Class
__________________
Burn the land and boil the sea
You can't take the sky from me


~T
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Formating of textbox stopped working
Formating of textbox stopped working
Formating of textbox stopped working Formating of textbox stopped working
Formating of textbox stopped working
Formating of textbox stopped working
Formating of textbox stopped working Formating of textbox stopped working Formating of textbox stopped working Formating of textbox stopped working Formating of textbox stopped working Formating of textbox stopped working Formating of textbox stopped working
Formating of textbox stopped working
Formating of textbox stopped working
 
Formating of textbox stopped working
Formating of textbox stopped working
 
-->