cut, copy, paste

  • Thread starter Thread starter Collin Jamieson
  • Start date Start date
C

Collin Jamieson

how can I write functions to cut, copy & paste the
currently selected text. this is new to me any code
examples would be great.


thanks CJ
 
This sample can be found in the TextBoxBase.SelectedText Property of the
documentation.

' Ensure that text is selected in the text box.
If textBox1.SelectionLength > 0 Then
' Copy the selected text to the Clipboard.
textBox1.Copy()
End If

Later,
January
 
yes but how can this be applied from the parents main
menu to any textbox on the active child
 
frmMain.ActiveForm.ActiveControl

This will return the currently active control on the currently active form.

Later,

January
 
Normally, you would use the selected control. It may not have focus but that
is the one you would need. I think there may be some abmiguity in your
question here.

Give us an accurate description ( example ) 'Exactly' what you might want to
do.

OHM
 
I pasted to the wrong level. Sorry Armin, did'nt mean to try and steal your
thunder.

Regards - OHM
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top