|
-
Aug 13th, 2001, 03:27 PM
#1
Thread Starter
Fanatic Member
Trap the paste?
I have a rich text box that has a cetain format to it...
I am trapping keystrokes to prevent certain things from being entered.
How can I check what is being pasted from the clipboard before the text is actually inserted into the richtextbox.
I do not wish to do this with _change... I need to trap it before the data is pasted.
any help would be great!
Kurt Simons
[I know I'm a hack but my clients don't!]
-
Aug 13th, 2001, 03:51 PM
#2
Frenzied Member
I know this is not the best way but why not do something like this.
VB Code:
Private Sub RichTextBox1_KeyDown(KeyCode As Integer, Shift As Integer)
Str = KeyCode & " " & Shift
If KeyCode = vbKeyV And Shift = 2 Then
RichTextBox1.Text = Str
End If
KeyCode = 0
End Sub
-
Aug 13th, 2001, 07:42 PM
#3
Thread Starter
Fanatic Member
Thanks
I'll pretend I didn't ask... not sure why I though it would be so complicated..
I guess with a regular text box you can right click it and then select paste but with a rich text box its not there.
thanks
Kurt Simons
[I know I'm a hack but my clients don't!]
-
Aug 14th, 2001, 06:26 PM
#4
Frenzied Member
I am sorry did you ask something? No just kidding. You are welcome.
-
Aug 14th, 2001, 07:11 PM
#5
Fanatic Member
Just to let you know, in case you're later using the RTB and wonder "where in the world did the menu go?", it isn't on by default. All of the options are still there as in a normal textbox, but it can be turned on/off with RTB.AutoVerbMenu.
I'm baaaack...
VB5 Professional Edition, VC++ 6
Using a 1 gHz Thunderbird, 256 mb RAM, 40 gb HD system with Win98se
I feel special because I finally figured out how to loop midis: Post link
I'm a fanatic too 
-
Aug 14th, 2001, 07:14 PM
#6
Frenzied Member
That is good to know. Hey i also have a 1.2 ghz with half a gig of ram and a 60 gig harddrive. It's a soyo board. Runs pretty nice. Hey and what is looping midis.
-
Aug 14th, 2001, 07:19 PM
#7
Fanatic Member
In this case, it's just playing an midi in VB, and having it replay once it's over automatically, with no timers or anything "sloppy" like that .
I'm baaaack...
VB5 Professional Edition, VC++ 6
Using a 1 gHz Thunderbird, 256 mb RAM, 40 gb HD system with Win98se
I feel special because I finally figured out how to loop midis: Post link
I'm a fanatic too 
-
Aug 14th, 2001, 07:28 PM
#8
Frenzied Member
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
|