|
-
Nov 1st, 2003, 11:55 PM
#1
Thread Starter
Member
Select All
G'day
i couldnt find any topic on this but it would be sweet if someone could help me
how the crap can i get select all to work in a text box?
simple question, but it seems it sone that noone has thwe answer too.
like beaing able to use ctrl + a
cheers for any help,
Will
In a world without fences, who needs GATES? The penguins are a comin'!
-
Nov 2nd, 2003, 12:07 AM
#2
PowerPoster
Use a "Rich Text Box" instead. Then use the SelStart property.
-We have enough youth. How about a fountain of "Smart"?
-If you can read this, thank a teacher....and since it's in English, thank a soldier.

-
Nov 2nd, 2003, 12:18 AM
#3
The picture isn't missing
Text1.SelStart = 0
Text1.SelLength = Len(Text1.Text)
Text1.SetFocus
-
Nov 2nd, 2003, 12:25 AM
#4
Thread Starter
Member
hey cheers guys,
it sure does select all,
but is there no way to tie that to Ctrl + A
sure i tied it to F8 for the time being, but the combo of butons is.... perplexing..
Cheers
Will
In a world without fences, who needs GATES? The penguins are a comin'!
-
Nov 2nd, 2003, 12:31 AM
#5
The picture isn't missing
i don't know how to prevent it from beeping
VB Code:
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = Asc("A") And Shift = vbKeyControl Then
Text1.SelStart = 0
Text1.SelLength = Len(Text1.Text)
Text1.SetFocus
End If
End Sub
-
Nov 2nd, 2003, 06:29 AM
#6
Supreme User
Just a quickshot guess.
Will this work to prevenet beeping?
-
Nov 2nd, 2003, 01:11 PM
#7
The picture isn't missing
Originally posted by Madboy
Just a quickshot guess.
Will this work to prevenet beeping?
......
well first of all you should have tried it.
and it won't work since BEEP is a function, not a variable whatever.
and there IS a way to stop it from beeping, but it's too complicated..... involves subclassing.
-
Nov 2nd, 2003, 01:35 PM
#8
Supreme User
Geez, sorry! First of all i didnt even have access to VB when i replied!
-
Nov 2nd, 2003, 10:01 PM
#9
Thread Starter
Member
You know, i couklndt get that code working :S
buggered if i know why
i tried lotsa things including keypreview, but alas, no stinkin luck
any ideas on wht the crap it dun werk??
have any of you tried it?
Cheers,
Will
In a world without fences, who needs GATES? The penguins are a comin'!
-
Nov 2nd, 2003, 10:58 PM
#10
PowerPoster
This will select text in a text box whent CTRL+A is pressed
VB Code:
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 1 Then
Text1.SelStart = 0
Text1.SelLength = 5
End If
End Sub
-We have enough youth. How about a fountain of "Smart"?
-If you can read this, thank a teacher....and since it's in English, thank a soldier.

-
Nov 2nd, 2003, 11:12 PM
#11
Thread Starter
Member
phwor, great stuf man
Cheers muchly!
-Will
In a world without fences, who needs GATES? The penguins are a comin'!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|