drawing line
-
dear fellow programmers, i have been trying to achieve this but it's so hard. i am trying to say make an image and when i mouse down the image and drag it, i want to draw a line from the initial of the image to where my mouse is. and when i release it, the line will disappear. is there anyway I can achieve this? thanks all...
-
dear fellow programmers, i have been trying to achieve this but it's so hard. i am trying to say make an image and when i mouse down the image and drag it, i want to draw a line from the initial of the image to where my mouse is. and when i release it, the line will disappear. is there anyway I can achieve this? thanks all...
-
dear fellow programmers, i have been trying to achieve this but it's so hard. i am trying to say make an image and when i mouse down the image and drag it, i want to draw a line from the initial of the image to where my mouse is. and when i release it, the line will disappear. is there anyway I can achieve this? thanks all...
There's paint program samples that will show you how to do this. You need to store the mouse position in member variables, and then do what danish said, draw them in your paint event. Except, as you want the line to disappear when the mouse comes up, this is actually a place where the CreateGraphics method of the form is valid, it's used to create a graphics object on which to draw temporary things.
Christian Graus Driven to the arms of OSX by Vista.