473,326 Members | 2,192 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

GDI (I Think...)

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.
Nov 15 '05 #1
2 1120
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

"Asaf Dan" <ad**@iai.co.il> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
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.

Nov 15 '05 #2
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
Nov 15 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

86
by: Michael Kalina | last post by:
Because when I asked for comments on my site-design (Remember? My site, your opinion!) some of you told me never to change anything on font-sizes! What do you guys think of that:...
39
by: George Hester | last post by:
How do they do it? http://home.nycap.rr.com/foryorisonly/spoof.htm It doesn't matter where the browser is when opened. But if the browser is minimazed then it jumps to (0,0) of the screen. ...
2
by: greatbooksclassics | last post by:
Open Source DRM? What does everyone think about it? Will Open Source DRM ever catch up to MS DRM? Will DRM ever be integrated into common LAMP applications?...
23
by: JDeats | last post by:
Just spent some time browsing around here: http://msdn.microsoft.com/Longhorn/ I can see the benefits from WinFS (as long as we tag all in-coming data this should be nice, tagging everything...
3
by: Angel | last post by:
Hello again (and again, and again...) I think I'm getting closer to solving my initial problem of calling unmanaged code. I managed to call the functions with user-defined structs w/o getting any...
40
by: Neo The One | last post by:
I think C# is forcing us to write more code by enforcing a rule that can be summarized as 'A local variable must be assgined *explicitly* before reading its value.' If you are interested in what...
29
by: GhostInAK | last post by:
I'm seeing a terribly distubing number of questions that have no purpose in existing. As an example: How do I change the position of a stream? Hmm.. Could it be some method on the stream...
1
by: Google Questions | last post by:
After NorthKorean problem, do you find any similarities between your country and North Korea ? What did you teach your kid generation about how they should think about the world ? If you are...
10
by: JonathanOrlev | last post by:
Hello everybody, I wrote this comment in another message of mine, but decided to post it again as a standalone message. I think that Microsoft's Office 2003 help system is horrible, probably...
0
by: raylopez99 | last post by:
I ran afoul of this Compiler error CS1612 recently, when trying to modify a Point, which I had made have a property. It's pointless to do this (initially it will compile, but you'll run into...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.