|
-
Jul 25th, 2002, 03:52 PM
#1
Thread Starter
Frenzied Member
text box question - newbie
I just havent used vb in a while, so its not me thats a n00b, just me question
Now that that is clarified, I want to make a textbox act like a label (so you cant have a caret or select stuff).
How do I do that simple thing?
retired member. Thanks for everything 
-
Jul 25th, 2002, 03:56 PM
#2
I wonder how many charact
-
Jul 25th, 2002, 04:04 PM
#3
Thread Starter
Frenzied Member
doesnt that make it gray?
how do I keep it black?
I also need to make this respond to click events
Last edited by markman; Jul 25th, 2002 at 04:09 PM.
retired member. Thanks for everything 
-
Jul 25th, 2002, 04:58 PM
#4
Thread Starter
Frenzied Member
usually newbie questions are answered quickly
or is this too tough for you????
MWAHAHAHAHAHA
retired member. Thanks for everything 
-
Jul 25th, 2002, 05:52 PM
#5
I wonder how many charact
Then skip the .enabled idea....
and set the .Locked = true
nevermind that doesn't work...
Ah for pete's sake, just use a label.....
-
Jul 25th, 2002, 05:55 PM
#6
Try this
VB Code:
Private Declare Function HideCaret Lib "user32" ( ByVal hwnd As Long) As Long
Private Sub Text1_GotFocus()
HideCaret Me.hwnd
End Sub
-
Jul 25th, 2002, 06:11 PM
#7
I wonder how many charact
That code looked golden Hack, thought to myself, wow, look at that elegance....
doesn't work though... at least on XP ...
-
Jul 25th, 2002, 06:12 PM
#8
I wonder how many charact
Ah, but it does work....
Me.Hwnd
Needs to be Text1.Hwnd
Forgive me master....
-
Jul 25th, 2002, 06:25 PM
#9
Another alternative (can never have too many)...
Put the textbox in a frame, and disable the frame.
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Jul 26th, 2002, 12:27 AM
#10
PowerPoster
Originally posted by crptcblade
Another alternative (can never have too many)...
Put the textbox in a frame, and disable the frame.
VB Code:
vbQuote = """
MyText = "Hello My Name Is " & vbQuote & "Ryan" & vbQuote
Ooops... wrong question...
-----------------------------------------
-RJ
[email protected]
-----------------------------------------
-
Jul 26th, 2002, 01:59 AM
#11
Fanatic Member
-
Jul 26th, 2002, 02:17 AM
#12
PowerPoster
Originally posted by faisalkm
come on guys....what the big deal in this...
textbox.enabled=false
textbox.backcolor=vbgray
He doesn't want it grey, I'm guessing...
-----------------------------------------
-RJ
[email protected]
-----------------------------------------
-
Jul 26th, 2002, 05:17 AM
#13
Addicted Member
Wouldn't this work?
Text1.locked = True
I could be wrong
-------------------------
My name says it all!
-
Jul 26th, 2002, 05:18 AM
#14
Addicted Member
OOPS.. never mind. He said so you cant select stuff
-------------------------
My name says it all!
-
Jul 26th, 2002, 05:24 AM
#15
Fanatic Member
perhaps something like:
VB Code:
Private Sub txtBox_GotFocus()
SomeOtherControl.SetFocus
End Sub
Martin J Wallace (Slaine)
-
Jul 28th, 2002, 02:36 AM
#16
PowerPoster
Originally posted by Slaine
perhaps something like:
VB Code:
Private Sub txtBox_GotFocus()
SomeOtherControl.SetFocus
End Sub
That's what I usually do.
-----------------------------------------
-RJ
[email protected]
-----------------------------------------
-
Jul 28th, 2002, 11:30 AM
#17
I wonder how many charact
Label still the best way to go.....
-
Jul 28th, 2002, 05:21 PM
#18
-
Jul 28th, 2002, 05:45 PM
#19
PowerPoster
-----------------------------------------
-RJ
[email protected]
-----------------------------------------
-
Jul 28th, 2002, 10:05 PM
#20
Frenzied Member
Originally posted by rjlohan
Overkill. It's called overkill.
and you like this?
-
Jul 28th, 2002, 10:18 PM
#21
I wonder how many charact
I'm still curious as to why a label can't be used?
....
-
Jul 28th, 2002, 10:31 PM
#22
The picture isn't missing
yah a label saves memory too.
make the borderstyle to 3d and the backcolor to white
Remember, if someone's post was not helpful, you can always rate their post negatively  .
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
|