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

.NET (Core and Framework)

 
QuestionNCoverExplorer Report & MSBuild Pin
Jammer6-Oct-09 10:48
Jammer6-Oct-09 10:48 
AnswerRe: NCoverExplorer Report & MSBuild [modified] Pin
Ergwun9-Jun-10 21:18
Ergwun9-Jun-10 21:18 
QuestionMemory leak in VB.NET screenshot application Pin
Jordan19826-Oct-09 4:10
Jordan19826-Oct-09 4:10 
AnswerRe: Memory leak in VB.NET screenshot application Pin
Dave Kreskowiak6-Oct-09 4:39
mveDave Kreskowiak6-Oct-09 4:39 
GeneralRe: Memory leak in VB.NET screenshot application Pin
Jordan19826-Oct-09 5:00
Jordan19826-Oct-09 5:00 
AnswerRe: Memory leak in VB.NET screenshot application Pin
Luc Pattyn6-Oct-09 5:39
sitebuilderLuc Pattyn6-Oct-09 5:39 
Questioncopy functionality does not work in CrystalReportViewer Pin
maryam.saboor6-Oct-09 1:02
professionalmaryam.saboor6-Oct-09 1:02 
QuestionBroken Clipping Region Pin
RichardM15-Oct-09 15:26
RichardM15-Oct-09 15:26 
I am working on a component that does its own non-client area borders using NCCalcSize and NCPaint. On some computers, it works correctly, and on others it works incorrectly.
The CODE:
using(Graphics g = Graphics.FromHwnd(Handle)}
{
    Rectangle backGround = new Rectangle(new Point(0, 0), Size);
    Rectangle clientRect = backGround;
    clientRect.Inflate(-wnd.BorderWidth, -wnd.BorderWidth);
    clientRect.Height -= captionDelta;
    clientRect.Y += captionDelta;
    g.ExcludeClip(clientRect);
    g.FillRectangle(new Pen(BackColor).Brush, new Rectangle(0, 0, Width, borderWidth + captionDelta));
    int halfBorder = borderWidth / 2;
    int halfCaption = wnd.CaptionHeight / 2;
    bool oddSize = (borderWidth % 2) == 1;
    int borderRectTop = Math.Max(wnd.CaptionHeight, 0) / 2;
    // draw two outline rectangles
    Rectangle borderRect = new Rectangle(0, borderRectTop, Width - 2, Height - (borderRectTop + 2));
    g.DrawRectangle(new System.Drawing.Pen(SystemColors.ButtonShadow, 1), borderRect);
    borderRect.Offset(1, 1);
    g.DrawRectangle(new System.Drawing.Pen(SystemColors.ButtonHighlight, 1), borderRect);
}


(I know this has undrawn pixels at top right, bottom left)
The Problem:
On some machines, this correctly draws the two rectangles inside the clipping region. On other machines, it does not. When it does not draw correctly, it is as through the excluded rectangle started one pixel earlier, and was two pixels wider than it really is.
So, if the excluded rectangle is [2,2,Width-4,Height-4], a line drawn from [0,0] to [0,Height] draws correctly, but a line drawn from [1,0] to [1,Height] only draws in the top and bottom two pixels, as though the excluded rectangle were[1,2,Width-2,Height-4].
All the machines are Dell optiplex 330s, the video driver dates are mixed, they are all using the same video chip set (NVidia 8400s, IIRC).
Does anyone know why this would happen? Is this a known bug, am I messing up somewhere, or ... ?
Urgent, please send code Laugh | :laugh:

Silver member by constant and unflinching longevity.

QuestionCustom file format - how to let Windows recognize properties like labels? Pin
pimb24-Oct-09 8:45
pimb24-Oct-09 8:45 
AnswerRe: Custom file format - how to let Windows recognize properties like labels? Pin
Richard MacCutchan5-Oct-09 1:01
mveRichard MacCutchan5-Oct-09 1:01 
GeneralRe: Custom file format - how to let Windows recognize properties like labels? Pin
pimb25-Oct-09 5:17
pimb25-Oct-09 5:17 
GeneralRe: Custom file format - how to let Windows recognize properties like labels? Pin
Richard MacCutchan5-Oct-09 6:25
mveRichard MacCutchan5-Oct-09 6:25 
GeneralRe: Custom file format - how to let Windows recognize properties like labels? Pin
pimb25-Oct-09 6:30
pimb25-Oct-09 6:30 
AnswerRe: Custom file format - how to let Windows recognize properties like labels? Pin
Richard MacCutchan5-Oct-09 7:22
mveRichard MacCutchan5-Oct-09 7:22 
GeneralRe: Custom file format - how to let Windows recognize properties like labels? Pin
Richard MacCutchan7-Oct-09 0:49
mveRichard MacCutchan7-Oct-09 0:49 
GeneralRe: Custom file format - how to let Windows recognize properties like labels? Pin
pimb214-Oct-09 2:52
pimb214-Oct-09 2:52 
GeneralRe: Custom file format - how to let Windows recognize properties like labels? Pin
Richard MacCutchan14-Oct-09 3:01
mveRichard MacCutchan14-Oct-09 3:01 
QuestionBindingSource Insert problem .... Pin
devboycpp3-Oct-09 22:19
devboycpp3-Oct-09 22:19 
QuestionWhy does my visual studio 2008 give me an error of "XMAL editor missing" when I try to use designer in WPF Pin
havegunwilltravel3-Oct-09 9:27
havegunwilltravel3-Oct-09 9:27 
AnswerRe: Why does my visual studio 2008 give me an error of "XMAL editor missing" when I try to use designer in WPF Pin
havegunwilltravel3-Oct-09 9:35
havegunwilltravel3-Oct-09 9:35 
AnswerRe: Why does my visual studio 2008 give me an error of "XMAL editor missing" when I try to use designer in WPF Pin
Mark Salsbery3-Oct-09 11:13
Mark Salsbery3-Oct-09 11:13 
AnswerRe: Why does my visual studio 2008 give me an error of "XMAL editor missing" when I try to use designer in WPF Pin
annathor7-Oct-09 2:10
annathor7-Oct-09 2:10 
Question.net reflactor Problem help Pin
hande543-Oct-09 2:01
hande543-Oct-09 2:01 
AnswerRe: .net reflactor Problem help Pin
Luc Pattyn3-Oct-09 2:06
sitebuilderLuc Pattyn3-Oct-09 2:06 
GeneralRe: .net reflactor Problem help Pin
hande543-Oct-09 2:27
hande543-Oct-09 2:27 

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.