Click here to Skip to main content
15,911,030 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: How to draw lines then undo ??? Pin
Christian Graus20-Jun-05 15:22
protectorChristian Graus20-Jun-05 15:22 
GeneralRe: How to draw lines then undo ??? Pin
Ray Guan20-Jun-05 15:36
Ray Guan20-Jun-05 15:36 
GeneralRe: How to draw lines then undo ??? Pin
Christian Graus20-Jun-05 15:39
protectorChristian Graus20-Jun-05 15:39 
GeneralRe: How to draw lines then undo ??? Pin
Ray Guan20-Jun-05 15:56
Ray Guan20-Jun-05 15:56 
GeneralRe: How to draw lines then undo ??? Pin
Christian Graus20-Jun-05 16:08
protectorChristian Graus20-Jun-05 16:08 
GeneralRe: How to draw lines then undo ??? Pin
lespaul3620-Jun-05 18:57
lespaul3620-Jun-05 18:57 
GeneralRe: How to draw lines then undo ??? Pin
Ray Guan20-Jun-05 15:29
Ray Guan20-Jun-05 15:29 
GeneralRe: How to draw lines then undo ??? Pin
Christian Graus20-Jun-05 15:41
protectorChristian Graus20-Jun-05 15:41 
nickong wrote:
the hard part gonna be the erasing of the selected line

That's not what he said, and you DON'T erase any lines. You either redraw all the lines except that one, on the starting image, or you simply replace the entire bitmap ( or a section of it), so that the line is just not there. You NEVER take the image with the line and try to replace it with the pixels that were there before.

nickong wrote:
cannot capture which point i right clicked on the line

Do you want to ? You never mentioned this. Oh damn, I think you did. The picture box is the first thing that needs to go. Beyond that, you need to keep an array of the points for each line. This means you can't use the bitmap undo idea, you need to build an action list of lines, which would just contain the two points, and if the colour changes, the colour you use. It's a simple struct.

nickong wrote:
cannot stroe all points of a line.

You don't need to. You just need a little trigonometry. You step through the lines in your array and for each, call a function to see if the point your mouse is at is on the line formed by the triangle created by the two points you've got for your line, and the point you make by drawing straight lines that intersect from the x and y directions.



Christian Graus - Microsoft MVP - C++
GeneralRe: How to draw lines then undo ??? Pin
Ray Guan20-Jun-05 15:18
Ray Guan20-Jun-05 15:18 
GeneralRe: How to draw lines then undo ??? Pin
Christian Graus20-Jun-05 15:24
protectorChristian Graus20-Jun-05 15:24 
GeneralRe: How to draw lines then undo ??? Pin
Ray Guan20-Jun-05 15:40
Ray Guan20-Jun-05 15:40 
GeneralRe: How to draw lines then undo ??? Pin
Christian Graus20-Jun-05 15:47
protectorChristian Graus20-Jun-05 15:47 
GeneralRe: How to draw lines then undo ??? Pin
lespaul3620-Jun-05 19:10
lespaul3620-Jun-05 19:10 
GeneralRe: How to draw lines then undo ??? Pin
T-Smooth21-Jun-05 2:01
T-Smooth21-Jun-05 2:01 
GeneralRe: How to draw lines then undo ??? Pin
lespaul3621-Jun-05 11:26
lespaul3621-Jun-05 11:26 
GeneralRecordsets in VB.Net Pin
directred20-Jun-05 4:29
directred20-Jun-05 4:29 
GeneralRe: Recordsets in VB.Net Pin
lespaul3620-Jun-05 9:19
lespaul3620-Jun-05 9:19 
GeneralCreating print documents Pin
Anonymous20-Jun-05 2:50
Anonymous20-Jun-05 2:50 
GeneralRe: Creating print documents Pin
Dave Kreskowiak20-Jun-05 3:58
mveDave Kreskowiak20-Jun-05 3:58 
GeneralApplying Updates Pin
nitin_ion20-Jun-05 0:21
nitin_ion20-Jun-05 0:21 
QuestionHow to do Web Scraping Using MS Inet Control Pin
shahzad316419-Jun-05 22:11
shahzad316419-Jun-05 22:11 
AnswerRe: How to do Web Scraping Using MS Inet Control Pin
Dave Kreskowiak20-Jun-05 1:31
mveDave Kreskowiak20-Jun-05 1:31 
AnswerRe: How to do Web Scraping Using MS Inet Control Pin
Ashaman20-Jun-05 1:52
Ashaman20-Jun-05 1:52 
GeneralDial-Up connection In .Net Pin
Anonymous19-Jun-05 21:09
Anonymous19-Jun-05 21:09 
GeneralRe: Dial-Up connection In .Net Pin
lespaul3621-Jun-05 12:53
lespaul3621-Jun-05 12:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.