Click here to Skip to main content
15,895,011 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# & Winforms equivilent to AfxMessageBox Pin
Kant24-Jun-03 11:10
Kant24-Jun-03 11:10 
GeneralRe: C# & Winforms equivilent to AfxMessageBox Pin
Matt Newman24-Jun-03 11:33
Matt Newman24-Jun-03 11:33 
GeneralGetting the size of the main application Pin
monrobot1324-Jun-03 10:04
monrobot1324-Jun-03 10:04 
GeneralRe: Getting the size of the main application Pin
leppie24-Jun-03 10:25
leppie24-Jun-03 10:25 
GeneralRe: Getting the size of the main application Pin
monrobot1324-Jun-03 11:08
monrobot1324-Jun-03 11:08 
GeneralRe: Getting the size of the main application Pin
leppie24-Jun-03 12:09
leppie24-Jun-03 12:09 
GeneralRe: Getting the size of the main application Pin
monrobot1325-Jun-03 11:24
monrobot1325-Jun-03 11:24 
GeneralBug in System.Drawing.Rectangle Pin
Arun Bhalla24-Jun-03 9:52
Arun Bhalla24-Jun-03 9:52 
I think I found a bug in C#'s Rectangle. At least, it seems like an
inconsistency.

A Rectangle is defined as a combination of a Point (the top-left corner)
and a Size.

Let's say I have a Rectangle at (0,0) with a Size of 100x100.
If I call Rectangle.Top, it returns the Y-coordinate of the top of
the rectangle. Likewise, for Rectangle.Bottom, Rectangle.Left, and
Rectangle.Right. So, for this Rectangle, Top = 0, Left = 0, Bottom = 100,
and Right = 100. At least, according to the Rectangle class. But
if I call Rectangle.Contains(new Point(100,100)), this returns false.

Technically, it seems that Rectangle.Contains() is behaving correctly.
Logically, the rectangle's true bounds are (0,0) to (99,99). So
(100,100) isn't really in that rectangle. But I would argue that
Rectangle.Bottom and Rectangle.Right shouldn't be returning 100, either,
if they are returning the coordinate of the corresponding edge.

Either Rectangle.Contains() needs to be fixed, or Bottom and Right need to be fixed. I think the latter is more appropriate. Until then, I guess we need to deduct 1 from those properties.

GeneralRe: Bug in System.Drawing.Rectangle Pin
leppie24-Jun-03 10:21
leppie24-Jun-03 10:21 
GeneralRe: Bug in System.Drawing.Rectangle Pin
Arun Bhalla24-Jun-03 12:16
Arun Bhalla24-Jun-03 12:16 
GeneralRe: Bug in System.Drawing.Rectangle Pin
John R. Shaw24-Jun-03 12:25
John R. Shaw24-Jun-03 12:25 
GeneralRe: Bug in System.Drawing.Rectangle Pin
Arun Bhalla24-Jun-03 12:51
Arun Bhalla24-Jun-03 12:51 
GeneralIt's a point of view Pin
John R. Shaw24-Jun-03 13:13
John R. Shaw24-Jun-03 13:13 
GeneralC# and VB.Net exam questions Pin
boro1224-Jun-03 6:52
boro1224-Jun-03 6:52 
GeneralExecuting Access Reports Pin
Uncle Monkey24-Jun-03 6:21
Uncle Monkey24-Jun-03 6:21 
GeneralCapturing Input Events Pin
Anonymous24-Jun-03 5:21
Anonymous24-Jun-03 5:21 
GeneralRe: Capturing Input Events Pin
John Fisher25-Jun-03 7:34
John Fisher25-Jun-03 7:34 
Generalassync call returns on wrong thread Pin
OmegaSupreme24-Jun-03 5:20
OmegaSupreme24-Jun-03 5:20 
GeneralRe: assync call returns on wrong thread Pin
David Stone24-Jun-03 7:44
sitebuilderDavid Stone24-Jun-03 7:44 
GeneralRe: assync call returns on wrong thread Pin
OmegaSupreme24-Jun-03 18:21
OmegaSupreme24-Jun-03 18:21 
QuestionThread not releasing resources? Pin
GISnet24-Jun-03 4:44
GISnet24-Jun-03 4:44 
GeneralRich Text Box Cursor Location Pin
MojoTheMonkey24-Jun-03 4:00
MojoTheMonkey24-Jun-03 4:00 
GeneralRe: Rich Text Box Cursor Location Pin
dynamic24-Jun-03 6:52
dynamic24-Jun-03 6:52 
GeneralRe: Rich Text Box Cursor Location Pin
leppie24-Jun-03 7:02
leppie24-Jun-03 7:02 
GeneralRe: Rich Text Box Cursor Location Pin
J. Dunlap24-Jun-03 7:38
J. Dunlap24-Jun-03 7:38 

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.