Hi Bailey..
1. In the GotFocus event of the textbox.. enter the code..
= CAPSLOCK(.T.)
2. You can generalise in the start of the main.PRG, you can put the code..
=CAPSLOCK(.t.)
This will make the Keyboard set with CAPSLOCK on
However, the suers can press the capslock key and change it. If you do not want that behaviour in your fields...
you can enter in the FORMAT property of the textboxes..
!
This will convert any lowercase input also to upper case.
3. IN places likle email address acceptance..in a textbox, you would want a lower case.
In the GotFocusEvent.. put the code..
=CAPSLOCK(.f.)
in the lostfocus event.. put the code..
=CAPSLOCK(.t.)
This should solve your problem. Keypress evet is not the right place.
3. Now to get the whole text as selected text in any text box couled with the CAPS LOCK..
enter in the FORMAT property..
K!
When the user types a letter it will replace all the selected text.
4. However if what you meant by highlighting a textbox getting a distinct color.. rather than selecting all the text.. then
in the GOtFocusEvent add the following code..
This.BackColor = RGB(255,192,192)
in the LostFocusEvent
This.BackColor = RGB(255,255,255)
The color codes can be suitably changed to your liking.

ramani

(Subramanian.G),FoxAcc, ramani_g@yahoo.com
Happy New Year