473,385 Members | 1,492 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

VB6.0 : Setting textbox to Caps Lock

wassup
34
Hi all,

I need a help again. How to set the textbox auto change to Upper Case without on the Caps Lock Key.
May 14 '07 #1
7 19369
Dököll
2,364 Expert 2GB
Hi all,

I need a help again. How to set the textbox auto change to Upper Case without on the Caps Lock Key.
Hiya, wassup!

I think it's somewhere in the line of :

Expand|Select|Wrap|Line Numbers
  1.  
  2. UCase(Text1.Text)
  3.  
  4.  
What is this for anyway?

You may also need SelStart in there

Expand|Select|Wrap|Line Numbers
  1.  
  2. Text1.Text = UCase$(Text1.SelStart)
  3.  
  4.  
Check it, I am typing this up from memory, but SelStart makes it that whatever is typed in according to the case specified.

Dököll
May 14 '07 #2
wassup
34
hi Dokoll,

i have try but its not working. its that key in at Form_load()?
May 14 '07 #3
Killer42
8,435 Expert 8TB
Try this...
Expand|Select|Wrap|Line Numbers
  1. Private Sub Text1_KeyPress(KeyAscii As Integer)
  2.   Select Case KeyAscii
  3.     Case 97 To 122
  4.       KeyAscii = KeyAscii - 32
  5.   End Select
  6. End Sub
May 14 '07 #4
wassup
34
Try this...
Expand|Select|Wrap|Line Numbers
  1. Private Sub Text1_KeyPress(KeyAscii As Integer)
  2.   Select Case KeyAscii
  3.     Case 97 To 122
  4.       KeyAscii = KeyAscii - 32
  5.   End Select
  6. End Sub
thanks killer. i got another source code too.
Expand|Select|Wrap|Line Numbers
  1. Private Sub txtPro_KeyPress(KeyAscii As Integer)
  2.    KeyAscii = Asc(UCase(Chr(KeyAscii)))
  3. End Sub
May 14 '07 #5
Killer42
8,435 Expert 8TB
thanks killer. i got another source code too.
Expand|Select|Wrap|Line Numbers
  1. Private Sub txtPro_KeyPress(KeyAscii As Integer)
  2.    KeyAscii = Asc(UCase(Chr(KeyAscii)))
  3. End Sub
Good idea. My version will be very language-specific. The Ucase function might be a bit smarter.
May 14 '07 #6
@Killer42
Thanks it's working..
Mar 2 '13 #7
Your idea works good..
Feb 19 '14 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

18
by: Robert | last post by:
Hi! I was wondering if the was any way to determine the state of the caps lock key, on or off. Of course I can capture the key events and see whether the caps lock is pressed, but that does not...
4
by: Peter D | last post by:
I have a second hand bar code reader (keyboard wedge) en i can read the bar codes but after every scan he turns my caps lock on. (GRRRRRR). I search a code to turn my caps lock off or can anyone...
3
by: Mike L | last post by:
How do I turn Caps Lock on, when my form opens?
0
by: fNew VBer | last post by:
Hi. I'm new to Visual Basic .NET, so you'll have to bear with me . . . I want to create an app that turns off CAPS LOCK when the SHIFT key is pressed. I got the code to turn off CAPS LOCK to...
1
by: charlies224 | last post by:
Hi, I am writting a software that requires me to make sure the Num Lock is always on and Caps Lock is always off. First, I know how to detect if Num Lock or Caps Lock is on or off (if...
6
by: Morten Dahl | last post by:
The shortcuts won't work in my application. CTRL+Z CTRL+C CTRL+Y CTRL+X etc... In stead I must use the SHIFT key: CTRL+SHIFT+Z
1
by: Brian Parker | last post by:
I play a DirectX game and while that game is running, I would like to change the behavior of the Caps Lock key. When it's pressed, I don't want it to toggle my Caps Lock on and off, but instead...
5
by: Muhammad Ahsin Saleem | last post by:
Hi I want to Turn Caps Lock off when I start my Application If Caps Lock option is on. Can anybody help me. Kindly do tell me about it.
1
by: gomzi | last post by:
hi, Is there a method to alert users of the caps lock being ON when the focus reaches a particular textbox? thanks, gomzi.
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.