c# - How change cursor when mouse is hover Image in RichTextBox? -
i'm using richtextbox control simulate basic editor. if functioning well.
but after insert image, how can change cursor caret whenever user try resize image? mean, how detect hover event of mouse (and change caret) when on image?
thank all!
edit1:
follows code i'm using allow users put images within rtb:
private sub contextmenustrip1items_click(sender object, e toolstripitemclickedeventargs) select case e.clickeditem.text case "colar", "paste" try contextmenustrip1.close() dim formato dataformats.format = nothing if **clipboard.containsimage** formato = dataformats.getformat(dataformats.bitmap) if richtextbox1.canpaste(formato) richtextbox1.paste(formato) end if** elseif clipboard.containstext(textdataformat.html) formato = dataformats.getformat(dataformats.html) if richtextbox1.canpaste(formato) richtextbox1.paste(formato) else richtextbox1.paste end if elseif clipboard.containstext(textdataformat.rtf) formato = dataformats.getformat(dataformats.rtf) if richtextbox1.canpaste(formato) richtextbox1.paste(formato) else richtextbox1.paste end if elseif clipboard.containstext richtextbox1.paste else msgbox("formato não suportado") end if catch ex exception end try case "imagem", "image" using ofd new openfiledialog ofd .multiselect = false .initialdirectory = "c:\documents" .filter = "image files (*.bmp, *.gif, *.jpg, *.png, *.tif)|*.bmp;*.gif;*.jpg;*.png;*.tif" end contextmenustrip1.close() if ofd.showdialog = windows.forms.dialogresult.ok if ofd.filename <> "" clipboard.setimage(image.fromfile(ofd.filename)) richtextbox1.paste() end if end if end using end case end sub
Comments
Post a Comment