Click here to Skip to main content
15,887,596 members
Home / Discussions / C#
   

C#

 
GeneralRe: Sql server Login details Pin
Not Active17-Aug-10 2:26
mentorNot Active17-Aug-10 2:26 
GeneralRe: Sql server Login details Pin
Dave Kreskowiak17-Aug-10 3:45
mveDave Kreskowiak17-Aug-10 3:45 
GeneralRe: Sql server Login details Pin
Eddy Vluggen17-Aug-10 9:43
professionalEddy Vluggen17-Aug-10 9:43 
Questiondetect border into user control Pin
billy_iii17-Aug-10 1:09
billy_iii17-Aug-10 1:09 
AnswerRe: detect border into user control Pin
R. Giskard Reventlov17-Aug-10 1:13
R. Giskard Reventlov17-Aug-10 1:13 
GeneralRe: detect border into user control Pin
billy_iii17-Aug-10 1:33
billy_iii17-Aug-10 1:33 
AnswerRe: detect border into user control PinPopular
Luc Pattyn17-Aug-10 1:52
sitebuilderLuc Pattyn17-Aug-10 1:52 
AnswerRe: detect border into user control Pin
AspDotNetDev17-Aug-10 13:26
protectorAspDotNetDev17-Aug-10 13:26 
If the blocks are composed of completely vertical and completely horizontal edges, this is easy. For horizontal edges, the edge of the circle closest to that edge will always be on the vertical line that intersects the circle's center. For vertical edges, the edge of the circle closest to that edge will always be on the horizontal line that intersects the circle's center. Compare the distance between the circle's center and the line edges to determine if the circle is inside the block.

If the blocks can be rotated, that makes it only slightly more complex. You can use the equation, y = mx + b (slope intercept form, if memory serves), to create an equation from two points on each edge (perfectly vertical lines being the exception)... you get those points from the block corners. From that equation, you can create a perpendicular line by inverting the slope and using the circle's center as one of the points that the perpendicular line passes through. Intersect the perpendicular line with the edge to determine where they meet. Use that point and the center of the circle to determine how far away the circle is from that edge. You can use that information to determine if the circle is inside the block.

There are also edge cases to check for. Make sure to detect if the center of the circle is inside the block (sounds like you already know how to do that). And you'll want to make sure to correctly check if the circle is on the corner of a block (easily checked for by comparing the circle radius to the distance between the center of the circle and the edges of the block).

Questionretrieving text from word file Pin
annie_bel17-Aug-10 0:26
annie_bel17-Aug-10 0:26 
AnswerRe: retrieving text from word file Pin
Richard MacCutchan17-Aug-10 0:47
mveRichard MacCutchan17-Aug-10 0:47 
AnswerRe: retrieving text from word file Pin
R. Giskard Reventlov17-Aug-10 0:47
R. Giskard Reventlov17-Aug-10 0:47 
QuestionCan't see the exception of the code Pin
Yanshof16-Aug-10 21:22
Yanshof16-Aug-10 21:22 
AnswerRe: Can't see the exception of the code Pin
R. Giskard Reventlov16-Aug-10 21:38
R. Giskard Reventlov16-Aug-10 21:38 
GeneralRe: Can't see the exception of the code Pin
Yanshof16-Aug-10 21:43
Yanshof16-Aug-10 21:43 
AnswerRe: Can't see the exception of the code Pin
Covean16-Aug-10 22:07
Covean16-Aug-10 22:07 
AnswerRe: Can't see the exception of the code Pin
OriginalGriff16-Aug-10 21:45
mveOriginalGriff16-Aug-10 21:45 
QuestionUnattended Installation of MSMQ in Windows 7 and XP Pin
faheemnadeem16-Aug-10 20:29
faheemnadeem16-Aug-10 20:29 
Questionproblem to reading multiple lines from txt page Pin
annie_bel16-Aug-10 19:25
annie_bel16-Aug-10 19:25 
AnswerRe: problem to reading multiple lines from txt page Pin
Dan Mos16-Aug-10 19:34
Dan Mos16-Aug-10 19:34 
AnswerRe: problem to reading multiple lines from txt page Pin
JF201516-Aug-10 20:13
JF201516-Aug-10 20:13 
GeneralRe: problem to reading multiple lines from txt page Pin
annie_bel16-Aug-10 20:40
annie_bel16-Aug-10 20:40 
AnswerRe: problem to reading multiple lines from txt page Pin
OriginalGriff16-Aug-10 21:49
mveOriginalGriff16-Aug-10 21:49 
Questionmulti file assembly in .net C# 3.5 Pin
amit sahu2016-Aug-10 8:08
amit sahu2016-Aug-10 8:08 
AnswerRe: multi file assembly in .net C# 3.5 PinPopular
OriginalGriff16-Aug-10 8:31
mveOriginalGriff16-Aug-10 8:31 
QuestionCustom Rendering Ink Pin
Tony Honter16-Aug-10 5:32
Tony Honter16-Aug-10 5:32 

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.