

using
System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.IO;
using System.Drawing.Drawing2D;
namespace WindowsApplication30
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load( object sender, EventArgs e)
{
}
// 柱状图
private void button3_Click( object sender, EventArgs e)
{
this .Height = 600 ;
this .Width = 500 ;
pictureBox1.Height = 500 ;
pictureBox1.Width = 450 ;
int [] a = new int []{ 30 , 20 , 50 , 40 , 40 , 78 , 45 , 98 , 87 , 47 , 46 , 98 };
int w = 400 ;
int h = 450 ;
Bitmap bmp = new Bitmap(w, h);
Graphics g = Graphics.FromImage(bmp);
g.Clear(Color.White);
g.DrawRectangle(Pens.AliceBlue, 0 , 0 , 399 , 399 );
string title = " 2009销售情况统计表 " ;
Font f = new Font( " 黑体 " , 16 );
g.DrawString(title, f, Brushes.Blue, (w /<
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.IO;
using System.Drawing.Drawing2D;
namespace WindowsApplication30
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load( object sender, EventArgs e)
{
}
// 柱状图
private void button3_Click( object sender, EventArgs e)
{
this .Height = 600 ;
this .Width = 500 ;
pictureBox1.Height = 500 ;
pictureBox1.Width = 450 ;
int [] a = new int []{ 30 , 20 , 50 , 40 , 40 , 78 , 45 , 98 , 87 , 47 , 46 , 98 };
int w = 400 ;
int h = 450 ;
Bitmap bmp = new Bitmap(w, h);
Graphics g = Graphics.FromImage(bmp);
g.Clear(Color.White);
g.DrawRectangle(Pens.AliceBlue, 0 , 0 , 399 , 399 );
string title = " 2009销售情况统计表 " ;
Font f = new Font( " 黑体 " , 16 );
g.DrawString(title, f, Brushes.Blue, (w /<