A good alternative too...
All new articles provide code in C# and VB.NET.
"Frank Hileman" <frankhil@no.spamming.prodigesoftware.com> wrote in message
news:%23mRE64CyFHA.624@TK2MSFTNGP11.phx.gbl...
> Change the WrapMode to TileFlipXY.
>
> Regards,
> Frank Hileman
>
> check out VG.net:
http://www.vgdotnet.com > Animated vector graphics system
> Integrated Visual Studio .NET graphics editor
>
> "Carlo, MCP" <carlodevREMOVE@gmail.com> wrote in message
> news:OHcaTG1xFHA.3588@tk2msftngp13.phx.gbl...
>> Hello Bob
>> I'm very glad to meet you on the ng. I recently used your page named "The
>> ToolboxBitmap puzzle"!
>>
>> Thank you for the suggestion. Applying your suggestion means that I'll
>> get rectangles that overflows my needs by 1 pixel.
>> Unfortunately, this is unacceptable for my needs since I calculate
>> rectangles sizes based on MeasureString for a very accurate placement of
>> text(s) and image(s) on the control.
>> Thank you for replying
>>
>> Carlo
>>
>>
>>
>> "Bob Powell [MVP]" <bob@_spamkiller_bobpowell.net> ha scritto nel
>> messaggio news:%2322vS30xFHA.1284@tk2msftngp13.phx.gbl...
>>> This is a known error (at least known to me) with LinearGradientBrush.
>>> It seems that the colour gradient is calculated slightly too short. The
>>> work-around is to make the gradient 1 pixel larger than the destination
>>> drawing rectangle.
>>>
>>> --
>>> Bob Powell [MVP]
>>> Visual C#, System.Drawing
>>>
>>> Ramuseco Limited .NET consulting
>>>
http://www.ramuseco.com >>>
>>> Find great Windows Forms articles in Windows Forms Tips and Tricks
>>>
http://www.bobpowell.net/tipstricks.htm >>>
>>> Answer those GDI+ questions with the GDI+ FAQ
>>>
http://www.bobpowell.net/faqmain.htm >>>
>>> All new articles provide code in C# and VB.NET.
>>> Subscribe to the RSS feeds provided and never miss a new article.
>>>
>>>
>>>
>>>
>>>
>>> "Carlo" <Carlo@discussions.microsoft.com> wrote in message
>>> news:2D471195-83E4-4C85-BE52-602F7512ACCE@microsoft.com...
>>>> Hello
>>>>
>>>> I found an abnormal behaviour on LinearGradientBrush (or
>>>> FillRectangle).
>>>> This code
>>>>
>>>> Public Class PanelPanel
>>>> Inherits System.Windows.Forms.Panel
>>>> Protected Overrides Sub OnPaint(ByVal e As
>>>> System.Windows.Forms.PaintEventArgs)
>>>> Dim rect As System.Drawing.Rectangle = New
>>>> System.Drawing.Rectangle(10, 10, Me.Width - 20, Me.Height - 20)
>>>> Dim gradientBrush As System.Drawing.Drawing2D.LinearGradientBrush
>>>> gradientBrush = New
>>>> System.Drawing.Drawing2D.LinearGradientBrush(rect, _
>>>> System.Drawing.Color.Gray,
>>>> _
>>>>
>>>> System.Drawing.Color.FloralWhite, _
>>>>
>>>> System.Drawing.Drawing2D.LinearGradientMode.Vertical)
>>>> e.Graphics.FillRectangle(gradientBrush, rect)
>>>> End Sub
>>>> End Class
>>>>
>>>> generates a control with an rectangle drawn inside.
>>>> The problem is that an unusual line (colored Color.FloralWhite) appears
>>>> on
>>>> the top edge of the rectangle. This line should not be there.
>>>> If LinearGradientMode id other than Vertical the problem persists, but
>>>> it is
>>>> less visible (only a small colored pixel is visible).
>>>>
>>>> Please note that the anomaly appears only with some rectangle sizes.
>>>> Example:
>>>> if rect={X=10,Y=10,Width=304,Height=208} 'equivalent to a Me.Size=New
>>>> Size(324,228) - Anomaly visible
>>>> if rect={X=10,Y=10,Width=304,Height=216} 'Correct, anomaly not visible
>>>>
>>>> Could someone PLEASE try to reproduce the problem (just copy code as
>>>> is) and
>>>> confirm that is an error and then reason with me??
>>>>
>>>> Thank you!.
>>>>
>>>> Carlo
>>>>
>>>> (MCP)
>>>>
>>>>
>>>
>>>
>>
>>
>
>