GDI

Tech-Archive recommends: Speed Up your PC by fixing your registry



Hi, I have the routine below where I wish to render a pie chart on a button. The routine works if I use the commented out code but I recently discovered a shorter way to do it (just the single line at the bottom of the routine). Only problem is the pie chart doesn't appear at all when I try the short method. I don't get any errors, it just doesn't appear. Any thoughts?

Private Sub piechart()
'Dim dg As Graphics
Dim sb = New SolidBrush(Color.Blue)

'me.button1.Image = New Bitmap(me.button1.Width, me.button1.Height)
'dg = Graphics.FromImage(me.button1.Image)
'dg.FillPie(sb, 0, 0, 50, 50, 0, 90)
me.button1.CreateGraphics.FillPie(sb, 0, 0, 50, 50, 0, 90)
End Sub
--
______ ___ __
/_ __/_ __/ _ )_______ ___ _/ /_____ ____
/ / / // / _ / __/ -_) _ `/ '_/ -_) __/
/_/ \_, /____/_/ \__/\_,_/_/\_\\__/_/
/___/

There are 10 types of people in this world; those who understand the binary numbering system and those who don't.

There's no place like 127.0.0.1.

ASCII a silly question, get a silly ANSI.
.


Quantcast