/ Forside / Teknologi / Udvikling / VB/Basic / Nyhedsindlæg
Login
Glemt dit kodeord?
Brugernavn

Kodeord


Reklame
Top 10 brugere
VB/Basic
#NavnPoint
berpox 2425
pete 1435
CADmageren 1251
gibson 1230
Phylock 887
gandalf 836
AntonV 790
strarup 750
Benjamin... 700
10  tom.kise 610
typing backwards
Fra : asd987


Dato : 21-11-04 16:50

Hello,

When I run the event below, I type backwards.The reason is that the cursor
moves to the first position of the textfield every time I type a character.

Private Sub Text1_Change()
Text1.Text = UCase(Text1.Text)
End Sub

How can I force the cursor to the normal (is last) position? Or is there a
better way to display all the characters in uppercase. Pressing the SHIFT or
CAPS LOCK buttons on the keyboard is no option in this case.

Thanks,

Sjoerd



 
 
Jens Vestergaard (21-11-2004)
Kommentar
Fra : Jens Vestergaard


Dato : 21-11-04 16:57

I news:cnqdfn$s5m$1@news3.zwoll1.ov.home.nl,
skrev asd987 <asd987@home.nl>:

>
> How can I force the cursor to the normal (is last) position? Or is
> there a better way to display all the characters in uppercase.
> Pressing the SHIFT or CAPS LOCK buttons on the keyboard is no option
> in this case.

> Private Sub Text1_Change()
> Text1.Text = UCase(Text1.Text)

Text1.SelStart = Len(Text1)

> End Sub


--
mvh
Jens Vestergaard (mailadr i dette indlæg er ikke gyldig!)



Tomas Christiansen (21-11-2004)
Kommentar
Fra : Tomas Christiansen


Dato : 21-11-04 21:26

asd987 skrev:
> Private Sub Text1_Change()
> Text1.Text = UCase(Text1.Text)
> End Sub
> ...is there a better way to display all the characters in uppercase.

Private Sub Text1_KeyPress(KeyAscii As Integer)
KeyAscii = Asc(UCase(Chr(KeyAscii)))
End Sub

-------
Tomas

Søg
Reklame
Statistik
Spørgsmål : 177558
Tips : 31968
Nyheder : 719565
Indlæg : 6408914
Brugere : 218888

Månedens bedste
Årets bedste
Sidste års bedste