Click here to Skip to main content
15,890,438 members
Home / Discussions / C#
   

C#

 
AnswerRe: how to modify the bios information Pin
mikone21-Sep-06 1:10
mikone21-Sep-06 1:10 
GeneralRe: how to modify the bios information Pin
Dan Neely21-Sep-06 2:13
Dan Neely21-Sep-06 2:13 
QuestionStretchable and movable line Pin
ssoffline21-Sep-06 0:33
ssoffline21-Sep-06 0:33 
AnswerRe: Stretchable and movable line Pin
Christian Graus21-Sep-06 0:54
protectorChristian Graus21-Sep-06 0:54 
GeneralRe: Stretchable and movable line Pin
ssoffline21-Sep-06 1:02
ssoffline21-Sep-06 1:02 
GeneralRe: Stretchable and movable line Pin
Christian Graus21-Sep-06 1:05
protectorChristian Graus21-Sep-06 1:05 
GeneralRe: Stretchable and movable line Pin
ssoffline21-Sep-06 1:11
ssoffline21-Sep-06 1:11 
GeneralRe: Stretchable and movable line Pin
Christian Graus21-Sep-06 1:20
protectorChristian Graus21-Sep-06 1:20 
Sounds to me like you want my rates to write it for you Smile | :)

First, you need to store your lines in a collection and draw them in your paint method. Then you need to write code to draw lines as you drag the mouse and add them to your collection when you lift the mouse.

If you want to select lines by drawing on them, you need to write code that works out if a pixel is close enough to a line to select it, probably first by working out if it's in the bounds of the box the line defines, then by walking the line if need be. Once you can select a line, you delete it by removing it from your collection, and calling Invalidate() ( which will redraw all the lines bar the one no longer there ). If you want to be able to click and drag it, then you basically want to draw focus points on the ends of the selected image, if you click inside one, you remove it from the collection, but make it the line being drawn, then your code to add lines will also allow you to move it.

Lots to do. In the first instance, make sure you understand the way Windows draws stuff, and crack a good GDI+ book.


Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog

GeneralRe: Stretchable and movable line Pin
mikone21-Sep-06 1:14
mikone21-Sep-06 1:14 
GeneralRe: Stretchable and movable line Pin
ssoffline21-Sep-06 1:42
ssoffline21-Sep-06 1:42 
Questionfew questions about database /datagrid Pin
faladrim20-Sep-06 23:56
faladrim20-Sep-06 23:56 
AnswerRe: few questions about database /datagrid Pin
Christian Graus21-Sep-06 0:14
protectorChristian Graus21-Sep-06 0:14 
AnswerRe: few questions about database /datagrid Pin
freshonlineMax21-Sep-06 0:21
freshonlineMax21-Sep-06 0:21 
GeneralRe: few questions about database /datagrid Pin
faladrim21-Sep-06 0:36
faladrim21-Sep-06 0:36 
QuestionHow to make an invisible exe ??? Pin
Waqas Nasir20-Sep-06 23:54
Waqas Nasir20-Sep-06 23:54 
AnswerRe: How to make an invisible exe ??? Pin
Christian Graus21-Sep-06 0:12
protectorChristian Graus21-Sep-06 0:12 
GeneralRe: How to make an invisible exe ??? Pin
Waqas Nasir21-Sep-06 0:39
Waqas Nasir21-Sep-06 0:39 
GeneralRe: How to make an invisible exe ??? Pin
Corinna John21-Sep-06 0:48
Corinna John21-Sep-06 0:48 
AnswerRe: How to make an invisible exe ??? Pin
J4amieC21-Sep-06 0:19
J4amieC21-Sep-06 0:19 
AnswerRe: How to make an invisible exe ??? Pin
Niiiissssshhhhhuuuuu21-Sep-06 0:35
Niiiissssshhhhhuuuuu21-Sep-06 0:35 
AnswerRe: How to make an invisible exe ??? Pin
Corinna John21-Sep-06 0:37
Corinna John21-Sep-06 0:37 
GeneralRe: How to make an invisible exe ??? Pin
Waqas Nasir21-Sep-06 0:47
Waqas Nasir21-Sep-06 0:47 
GeneralRe: How to make an invisible exe ??? Pin
Corinna John21-Sep-06 0:50
Corinna John21-Sep-06 0:50 
GeneralRe: How to make an invisible exe ??? Pin
Waqas Nasir21-Sep-06 0:59
Waqas Nasir21-Sep-06 0:59 
AnswerRe: How to make an invisible exe ??? Pin
Guffa21-Sep-06 1:02
Guffa21-Sep-06 1:02 

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.