GDI (I Think...)

  • Thread starter Thread starter Asaf Dan
  • Start date Start date
A

Asaf Dan

Hi,

After Drawing a line or a polygon on an image (in a panel / pictureBox
control) i would like to catch it with mouseDown and drag it to a new
location.

How can i do something like that?

Thanks in advance,
Asaf Dan.
 
Hi Asaf,
In order to accomplish this you would have to implement the mouseDown,
mouseMove
and mouseUp function and redraw the line when the mouse moves
 
Hi Asaf,

If you're drawing your shape on an existing image and subsequently
moving the shape, you'll have the problem of "undrawing" it to leave the
image intact before redrawing the shape elsewhere.

In this case you'd have to draw your shape on a transparent PictureBox
which floats above your image. This PictureBox can then be dragged around to
your heart's content without you needing to worry about the underlying
image. In fact you may not even have to draw the shape again.

Unfortunately I say all this without knowing how to create a transparent
PictureBox!

Hope this is of use,

Good luck,
Fergus
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top