I
Ike
In converting a VB6 app over to .NET, I encounter a particularly troublesome
element regarding RichText.
Private Sub mnuEditCopy_Click()
Clipboard.SetText ActiveForm.rtfText.SelRTF
End Sub
Public datobj As New System.Windows.Forms.DataObject()
Public Sub mnuEditCopy_Click(ByVal eventSender As System.Object, ByVal
eventArgs As System.EventArgs) Handles mnuEditCopy.Click
datobj.SetData(System.Windows.Forms.DataFormats.Text,
ActiveMdiChild.rtfText.SelRTF)
System.Windows.Forms.Clipboard.SetDataObject(datobj)
End Sub
Upon compilation of course, I get the error message 'rtfText' is not a
member of 'System.Windows.Forms.Form.'
HOWEVER, there are NO RichTextBoxes on any forms here - it's all just
straight text boxes (this is an ancient project I inherited from someone
else, and has been through many iterations - evidently no one ever got rid
of the references to rich text on the clipboard!).
So I am wondering how I can convert the statement
"ActiveMdiChild.rtfText.SelRTF" to refer to plain text, not richtext, so as
to avoid this error?
Thanks, Ike
element regarding RichText.
Private Sub mnuEditCopy_Click()
Clipboard.SetText ActiveForm.rtfText.SelRTF
End Sub
Public datobj As New System.Windows.Forms.DataObject()
Public Sub mnuEditCopy_Click(ByVal eventSender As System.Object, ByVal
eventArgs As System.EventArgs) Handles mnuEditCopy.Click
datobj.SetData(System.Windows.Forms.DataFormats.Text,
ActiveMdiChild.rtfText.SelRTF)
System.Windows.Forms.Clipboard.SetDataObject(datobj)
End Sub
Upon compilation of course, I get the error message 'rtfText' is not a
member of 'System.Windows.Forms.Form.'
HOWEVER, there are NO RichTextBoxes on any forms here - it's all just
straight text boxes (this is an ancient project I inherited from someone
else, and has been through many iterations - evidently no one ever got rid
of the references to rich text on the clipboard!).
So I am wondering how I can convert the statement
"ActiveMdiChild.rtfText.SelRTF" to refer to plain text, not richtext, so as
to avoid this error?
Thanks, Ike