private void drawbutton( int w,int h)
{
Bitmap bm = new System.Drawing.Bitmap(w,h);
Rectangle nrc = new System.Drawing.Rectangle(0,0,w,h);
LinearGradientBrush gbrush = new LinearGradientBrush(nrc, StartColor, EndColor, (Single)(FillDirection == 0 ? 0 : 90));
Graphics g = Graphics.FromImage(bm);
Graphics gr = GFB.CreateGraphics();
g.FillRectangle(gbrush, nrc);
gr.DrawImage(bm,nrc);
g.Dispose();
gr.Dispose();
}