Results 1 to 3 of 3

Thread: Rich Text Box blues [unresolved]

Threaded View

  1. #1

    Thread Starter
    Junior Member husain's Avatar
    Join Date
    Jul 2002
    Location
    United Arab Emirates
    Posts
    31

    Rich Text Box blues [unresolved]

    In my application, I have a rich text box that should only contain text (in rich text format with all those tabs and styles) but not images and other things. The only way things can be 'inserted' into this box is by pasting. So here's the sub that handles this:
    VB Code:
    1. Private Sub mnuSnippetBoxPaste_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuSnippetBoxPaste.Click
    2.   If SnippetBox.CanPaste([u]DataFormats.Rtf[/u]) Then
    3.     SnippetBox.Paste([u]DataFormats.Rtf[/u])
    4.   End If
    5. End Sub
    However, I get an error in both instances of DataFormats.Rtf (underlined above) that says:

    Value of type 'String' cannot be converted to 'System.Windows.Forms.DataFormats.Format'.

    Hope someone can tell me what I am doing wrong.
    Last edited by husain; Sep 16th, 2002 at 09:24 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width