Results 1 to 3 of 3

Thread: control Paste (Ctrl+P) Image size in RichTextBox

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 2010
    Location
    Spain
    Posts
    92

    Question control Paste (Ctrl+P) Image size in RichTextBox

    control Paste (Ctrl+P) Image size in RichTextBox

    I can do an context menu with a item of Paste, and in it I can control what image type is (width, height, resolution, format...), then for example I can msgbox when the user try to paste (using contextmenu) a too big image.

    but if the user uses Control+P the paste occurs whitout my code.

    then

    1.- ¿how can I run some code with Paste and optionally cancel the paste?

    2.- ¿how can I reduce the format (colors)?
    i.e. the cb.image has Format32, how to reduce to Format8?

    btw seems to be that clipboard.paste allways have Format32.

  2. #2
    Frenzied Member
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,158

    Re: control Paste (Ctrl+P) Image size in RichTextBox

    If it doesn't make much difference then you can set the ShortCutEnabled property of the the RTB to False

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jun 2010
    Location
    Spain
    Posts
    92

    Re: control Paste (Ctrl+P) Image size in RichTextBox

    Quote Originally Posted by aashish_9601 View Post
    If it doesn't make much difference then you can set the ShortCutEnabled property of the the RTB to False
    nope, this invalidates all the other shortcuts.

    I wanto to intercept the paste event, in order to control the kind of images to paste,
    or at least avoid ctrl+V (this is not so good solution even)

    and any clue to how to reduce image in clipboard?

Tags for this Thread

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