This is a rough explanation of the technique you would use if you do not
want to stretch a bitmap.
If you read this:
http://weblogs.asp.net/frank_hileman/archive/2004/10/29/249637.aspx It explains how to draw a gel ellipse, which is similar to a gel button. The
difference is the FocusScaling property value for a rectangle would be
changed in the x dimension to stretch the inner color, as in these examples:
http://www.vgdotnet.org/forums/viewtopic.php?t=194 Generally you want to stretch the inner color till it touches the center of
the circle defining the curved portion of the button on the left and right
sides. The focus scaling is a fraction of the total width. So if the radius
is 50, and your total button width is 200, your focus scaling in the x
dimension would be
(200 - 2 * 50)/200 = .5
The shine fill is more complex if you want to use a different x and y radius
for that.
My explanations are for VG.net but the properties map to GDI+.
Regards,
Frank Hileman
check out VG.net:
http://www.vgdotnet.com Animated vector graphics system
Integrated Visual Studio .NET graphics editor
[quoted text, click to view] "TonyVal - MSDN News" <tonyval_2002@yahoo.com> wrote in message
news:e28CmoqhFHA.2444@tk2msftngp13.phx.gbl...
> Thank you. I read this code arealdy.
> But this don't tell me how to change color of the button.
>
> Regards,
>
>
> "Thomas Wenning" <nospam.mittsommernachtslauf@gmx.de> wrote in message
> news:OVGuntghFHA.3532@TK2MSFTNGP10.phx.gbl...
>>
>> "TonyVal - MSDN News" <tonyval_2002@yahoo.com> schrieb im Newsbeitrag
>> news:%23VxYrGfhFHA.2560@TK2MSFTNGP10.phx.gbl...
>> > Hi All,
>> >
>> > Anyone know how to change color for a 3D button like this button
>> > control
>> > does?
>> >
http://www.econtechvn.com/en/aquabutton_detail.htm >> > I see it is really cool. But, don't know how to do that.
>> >
>> > Thanks,
>> > TonyVal
>> >
>> >
>>
>> Hi Tony,
>>
>> look hier:
>>
http://www.codeproject.com/cs/miscctrl/aquabutton.asp >>
>> Greeting
>>
>> Thomas Wenning
>>
>>
>
>