![]() |
|
|||||||
| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| Questions & Help Needed Post any question regarding Basic4ppc. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
I know that this is stupid question but I'm agonize with...
![]() (I want to make desktop application) I have TextBox (Only One) And after key_press I want string automatically go to uppercase. I have this: Sub TextBox1_KeyPress(key) TextBox1.Text = StrToUpper(TextBox1.Text) End Sub So, when I push First Key, nothings happen - (lowercase), and when I push second key, then the First Key Is Uppercase, the CURSOR is on the beginning of the TextBox1 focus, and ONE FROM ANOTHER every next key is Uppercase, BUT MY WORDS IS TOPSY-TURVY ... Aaaaaaahhhhh ![]() Some Help...? Thx |
|
||||
|
You have two problems here. Firstly you get the KeyPress event before that key is added to the textbox so it doesn't get uppercased. Secondly the insertion point is lost when you uppercase the string.
The solution to the first is to use the new Door library Door library (Beta) - Special library to catch the TextChanged event which occurs after the key is added. The solution to the second is to save and restore the insertion point. Last edited by agraham : 04-09-2008 at 10:02 AM. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Structures & Uppercase | skipper | Questions & Help Needed | 4 | 02-06-2008 07:00 AM |
| lowercase 2 uppercase | kavka | Questions & Help Needed | 1 | 01-12-2008 10:25 PM |