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.
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
Re: control Paste (Ctrl+P) Image size in RichTextBox
Quote:
Originally Posted by
aashish_9601
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?