Click here to Skip to main content
15,915,093 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: Is .Net really an improvement over other IDEs? Pin
Member 22462854-Sep-05 15:54
Member 22462854-Sep-05 15:54 
GeneralRe: Is .Net really an improvement over other IDEs? Pin
Christian Graus4-Sep-05 16:05
protectorChristian Graus4-Sep-05 16:05 
GeneralRe: Is .Net really an improvement over other IDEs? Pin
Member 22462854-Sep-05 17:30
Member 22462854-Sep-05 17:30 
GeneralRe: Is .Net really an improvement over other IDEs? Pin
Christian Graus4-Sep-05 17:36
protectorChristian Graus4-Sep-05 17:36 
GeneralRe: Is .Net really an improvement over other IDEs? Pin
Michael P Butler6-Sep-05 0:24
Michael P Butler6-Sep-05 0:24 
QuestionSHA-2, is it in .NET? PinPopular
Dave Shaw2-Sep-05 13:13
Dave Shaw2-Sep-05 13:13 
AnswerRe: SHA-2, is it in .NET? Pin
Paul Conrad14-Sep-05 19:59
professionalPaul Conrad14-Sep-05 19:59 
QuestionGDI Region Union Bug Pin
Steve Knauber2-Sep-05 4:27
Steve Knauber2-Sep-05 4:27 
There appears to be a bug in the Region.Union function in GDI+. I see this in programs developed in C# .Net using Visual Studio 2003. I have been using Regions in an application I have been developing and in most cases have had no problems with the Union function. I noticed some occasional glitches in my program and have traced them to this bug in Microsoft's routine. The Union function allows you to build up various shapes/regions together into a region encompassing all the subparts. In the example below I create a Region that is the combination of 3 rectangles. The fact that the rectangles overlap may be what triggers the bug, although the function should be able to work with overlapping areas.

If anyone can prove me wrong I'll be very impressed.

The problem can be demonstrated in this simple test code which responds to the paint event. To run the code, create a C# windows forms application. And put this code in your paint event handler.

The code will draw the outlines of the three rectangles with a black dashed line. The pink area should be the combination/union of the areas of the 3 rectangles. You'll see there is a small area missing that should be filled in pink but its not.

I wasn't able to find anything on the internet regarding this bug so I thought I would post it.
<br />
private void Form1_Paint(object sender, System.Windows.Forms.PaintEventArgs e)<br />
{<br />
   // Create three rectangles<br />
   Rectangle rect1,rect2,rect3;<br />
   rect1 = new Rectangle(435,235,50,50); // small<br />
   rect2 = new Rectangle(180,80,250,250); // large<br />
   rect3 = new Rectangle(335,135,250,250); // large<br />
<br />
   // Create and fill Region which is union of the 3 rectangles<br />
   Region redrawRegion = new Region();<br />
   redrawRegion.MakeEmpty();<br />
   redrawRegion.Union(rect1);<br />
   redrawRegion.Union(rect2);<br />
   redrawRegion.Union(rect3);<br />
   using(Brush myBrush = new SolidBrush(Color.Fuchsia))<br />
   {<br />
      e.Graphics.FillRegion(myBrush,redrawRegion);<br />
   }<br />
<br />
   // Draw the outline of the 3 rectangles with a dashed black pen<br />
   using(Pen myPen = new Pen(Color.Black))<br />
   {<br />
      myPen.DashStyle = System.Drawing.Drawing2D.DashStyle.Dash;<br />
      e.Graphics.DrawRectangle(myPen,rect1);<br />
      e.Graphics.DrawRectangle(myPen,rect2);<br />
      e.Graphics.DrawRectangle(myPen,rect3);<br />
   }<br />
}


Any suggestions or comments are welcome.


Steve Knauber
QuestionApplication Architecture Pin
radasys2-Sep-05 3:51
radasys2-Sep-05 3:51 
AnswerRe: Application Architecture Pin
radasys5-Sep-05 0:38
radasys5-Sep-05 0:38 
Question.Net and HtmlHelp function Pin
daisyliu1-Sep-05 6:34
daisyliu1-Sep-05 6:34 
QuestionTimeZone.CurrentTimeZone not updated when machine's time zone changes. Pin
Matt Casto1-Sep-05 6:17
Matt Casto1-Sep-05 6:17 
AnswerRe: TimeZone.CurrentTimeZone not updated when machine's time zone changes. Pin
Matt Casto2-Sep-05 4:59
Matt Casto2-Sep-05 4:59 
AnswerRe: TimeZone.CurrentTimeZone not updated when machine's time zone changes. Pin
Richard Deeming5-Sep-05 8:17
mveRichard Deeming5-Sep-05 8:17 
GeneralRe: TimeZone.CurrentTimeZone not updated when machine's time zone changes. Pin
Matt Casto5-Sep-05 15:32
Matt Casto5-Sep-05 15:32 
GeneralRe: TimeZone.CurrentTimeZone not updated when machine's time zone changes. Pin
Richard Deeming5-Sep-05 23:50
mveRichard Deeming5-Sep-05 23:50 
GeneralRe: TimeZone.CurrentTimeZone not updated when machine's time zone changes. Pin
Matt Casto6-Sep-05 1:17
Matt Casto6-Sep-05 1:17 
GeneralRe: TimeZone.CurrentTimeZone not updated when machine's time zone changes. Pin
Richard Deeming6-Sep-05 6:57
mveRichard Deeming6-Sep-05 6:57 
Question[security] setting dynamically the proxy.Credentials with the currentIdentity Pin
joaoPaulo1-Sep-05 3:36
joaoPaulo1-Sep-05 3:36 
Questionlook for some options which can pass through firewall Pin
at2000131-Aug-05 16:35
at2000131-Aug-05 16:35 
AnswerRe: look for some option witch can pass through firewall Pin
Andy Brummer31-Aug-05 17:55
sitebuilderAndy Brummer31-Aug-05 17:55 
GeneralRe: look for some option witch can pass through firewall Pin
at2000131-Aug-05 23:52
at2000131-Aug-05 23:52 
GeneralRe: look for some option witch can pass through firewall Pin
Andy Brummer1-Sep-05 3:34
sitebuilderAndy Brummer1-Sep-05 3:34 
QuestionExtracting Frames From The AVI Movie Pin
Nabeel Younus Khan31-Aug-05 11:04
Nabeel Younus Khan31-Aug-05 11:04 
QuestionWindows Service arguments Pin
vSoares31-Aug-05 5:44
professionalvSoares31-Aug-05 5:44 

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.