Click here to Skip to main content
15,922,407 members
Home / Discussions / C#
   

C#

 
AnswerRe: Send data toServer with two parameters Pin
Carmen_Mundi19-Apr-18 5:55
Carmen_Mundi19-Apr-18 5:55 
GeneralRe: Send data toServer with two parameters Pin
Richard MacCutchan19-Apr-18 6:13
mveRichard MacCutchan19-Apr-18 6:13 
GeneralRe: Send data toServer with two parameters Pin
Carmen_Mundi19-Apr-18 7:37
Carmen_Mundi19-Apr-18 7:37 
GeneralRe: Send data toServer with two parameters Pin
Richard MacCutchan19-Apr-18 21:53
mveRichard MacCutchan19-Apr-18 21:53 
QuestionReading a specific portion of a text file Pin
Member 1377871518-Apr-18 4:42
Member 1377871518-Apr-18 4:42 
AnswerRe: Reading a specific portion of a text file Pin
OriginalGriff18-Apr-18 4:59
mveOriginalGriff18-Apr-18 4:59 
GeneralRe: Reading a specific portion of a text file Pin
Member 1377871518-Apr-18 7:34
Member 1377871518-Apr-18 7:34 
GeneralRe: Reading a specific portion of a text file Pin
OriginalGriff18-Apr-18 8:16
mveOriginalGriff18-Apr-18 8:16 
GeneralRe: Reading a specific portion of a text file Pin
Member 1377871518-Apr-18 11:29
Member 1377871518-Apr-18 11:29 
AnswerRe: Reading a specific portion of a text file Pin
Gerry Schmitz18-Apr-18 5:54
mveGerry Schmitz18-Apr-18 5:54 
QuestionManagementScope, did it get deprecated or something? Pin
Robert Oujesky18-Apr-18 4:38
Robert Oujesky18-Apr-18 4:38 
AnswerRe: ManagementScope, did it get deprecated or something? Pin
OriginalGriff18-Apr-18 5:03
mveOriginalGriff18-Apr-18 5:03 
GeneralRe: ManagementScope, did it get deprecated or something? Pin
Eddy Vluggen18-Apr-18 6:01
professionalEddy Vluggen18-Apr-18 6:01 
GeneralRe: ManagementScope, did it get deprecated or something? Pin
OriginalGriff18-Apr-18 6:25
mveOriginalGriff18-Apr-18 6:25 
GeneralRe: ManagementScope, did it get deprecated or something? Pin
Robert Oujesky18-Apr-18 6:25
Robert Oujesky18-Apr-18 6:25 
GeneralRe: ManagementScope, did it get deprecated or something? Pin
OriginalGriff18-Apr-18 6:29
mveOriginalGriff18-Apr-18 6:29 
GeneralRe: ManagementScope, did it get deprecated or something? Pin
Robert Oujesky18-Apr-18 6:41
Robert Oujesky18-Apr-18 6:41 
GeneralRe: ManagementScope, did it get deprecated or something? Pin
Eddy Vluggen18-Apr-18 7:10
professionalEddy Vluggen18-Apr-18 7:10 
GeneralRe: ManagementScope, did it get deprecated or something? Pin
OriginalGriff18-Apr-18 8:02
mveOriginalGriff18-Apr-18 8:02 
GeneralRe: ManagementScope, did it get deprecated or something? Pin
Robert Oujesky18-Apr-18 8:49
Robert Oujesky18-Apr-18 8:49 
GeneralRe: ManagementScope, did it get deprecated or something? Pin
OriginalGriff18-Apr-18 9:15
mveOriginalGriff18-Apr-18 9:15 
QuestionHow can I add the distance value between the line(from point A to point B) in C#? Pin
Member 1378306217-Apr-18 22:27
Member 1378306217-Apr-18 22:27 
AnswerRe: How can I add the distance value between the line(from point A to point B) in C#? Pin
OriginalGriff17-Apr-18 22:35
mveOriginalGriff17-Apr-18 22:35 
AnswerRe: How can I add the distance value between the line(from point A to point B) in C#? Pin
V.17-Apr-18 23:56
professionalV.17-Apr-18 23:56 
This is from the top of my head so you'll have to work out the details yourself.

Catch the events mousedown and mousemove. If the mouse moves AND mouse button is down you're drawing (or so I assume).
You'll need to find out the coordinates from your canvas where top-left = 0,0 and x moves up to the right and y moves up going down! It might be you need to fiddle with it to get the right coordinates as windows tends to work with multiple sets (your window, your control, the screen, ...)

Once you have the correct coordinates and you start drawing a line (= first point is known) you can calculate the length of your line: sqrt((x2-x1)^2 + (y2-y1)^2) use your mouse location to get the second point.

To set that value on screen, draw a string on the location (x2+x1)/2 and (y2/y1)/2.

This solution should at least get you a bit further, but again, this is on top of my head, you'll need to figure out a lot of it yourself.
V.

AnswerRe: How can I add the distance value between the line(from point A to point B) in C#? Pin
Gerry Schmitz18-Apr-18 6:03
mveGerry Schmitz18-Apr-18 6:03 

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.