K
Keith
I'm trying to come up with a way to create a contextmenu
that will do all the "standard" functions (cut, copy,
paste, undo, etc).
There seems to be a lot of information out there - but
nothing seems to work for me. A few people refer to
txt.copy() txt.paste(), etc. I'm not sure if those are
old functions, but they do not work for me.
I've tried textbox1.selectall() - that works in selecting
all the text in the textbox1 that I have. However - I'm
still looking for the other functions. Then I ran across
a MSDN article - visual Studio - Placing Data on the
Clipboard. The code is as follows:
' Visual Basic
Private Sub Button1_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles Button1.Click
Clipboard.SetDataObject(TextBox1.Text)
End Sub
This will place data on teh clipboard. Have not tried it
yet - looks like it will work. They also have code to
retreive the data from the clipboard.
Just wondering how everyone else creats these click events?
Also - if anyone can steer me in the right direction when
it comes to the Undo command?
Thanks.
that will do all the "standard" functions (cut, copy,
paste, undo, etc).
There seems to be a lot of information out there - but
nothing seems to work for me. A few people refer to
txt.copy() txt.paste(), etc. I'm not sure if those are
old functions, but they do not work for me.
I've tried textbox1.selectall() - that works in selecting
all the text in the textbox1 that I have. However - I'm
still looking for the other functions. Then I ran across
a MSDN article - visual Studio - Placing Data on the
Clipboard. The code is as follows:
' Visual Basic
Private Sub Button1_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles Button1.Click
Clipboard.SetDataObject(TextBox1.Text)
End Sub
This will place data on teh clipboard. Have not tried it
yet - looks like it will work. They also have code to
retreive the data from the clipboard.
Just wondering how everyone else creats these click events?
Also - if anyone can steer me in the right direction when
it comes to the Undo command?
Thanks.