|
-
Sep 23rd, 2000, 09:44 PM
#1
Thread Starter
Fanatic Member
How to select all the text in a text box? Can anyon please give me code for cut, copy and paste.
Kinjal
-
Sep 23rd, 2000, 09:47 PM
#2
Frenzied Member
here you go:
Code:
Text1.SetFocus
Text1.SelStart = 0
Text1.SelLength = Len(Text1)
NXSupport - Your one-stop source for computer help
-
Sep 23rd, 2000, 10:57 PM
#3
To copy text:
Code:
Private Sub Command1_Click()
Clipboard.Clear
Clipboard.SetText Text1.text
End Sub
To copy the selected text:
Code:
Private Sub Command1_Click()
Clipboard.Clear
If Text1.SelText <> "" Then
Clipboard.SetText Text1.SelText
Else
End If
End Sub
To paste text:
Code:
Private Sub Command2_Click()
Text1.text = ClipBoard.GetText()
End Sub
-
Sep 23rd, 2000, 11:02 PM
#4
To cut text:
Code:
Private Sub Command1_Click()
Clipboard.Clear
Clipboard.SetText Text1.text
Text1.Text = ""
End Sub
[/quote]
To cut selection:
Code:
Private Sub Command1_Click()
Clipboard.Clear
If Text1.SelText <> "" Then
Clipboard.SetText Text1.SelText
Text1.SelText = ""
Else
End If
End Sub
-
Sep 23rd, 2000, 11:13 PM
#5
Cut and Copy are basically the same thing, except that when you cut, the text is cleared afterwards, whereas if you copy, than no text is cleared.
-
Sep 23rd, 2000, 11:24 PM
#6
I know that, if you look at my code, you will discover that I do know that.
-
Sep 24th, 2000, 11:37 AM
#7
Thread Starter
Fanatic Member
Thanks a lot!
Kinjal
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
|