c#我这样写代码后,为什么运行后窗体不显示picturebox中的图片,要怎样才能显示

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace _1340226147
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();

    }

    private void Form1_Load(object sender, EventArgs e)
    {

    }
    private void AddPictureBox(int left, int top)
    {

    }

    private void axBarCodeCtrl1_Enter(object sender, EventArgs e)
    {
        axBarCodeCtrl1.Value = "1340226147";
    }

    private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
    {
        Graphics g = e.Graphics;
        Bitmap bb = BarCodeTest.ControlBitmap.getControlBitmap(axBarCodeCtrl1);
        g.DrawString("***", new Font("宋体", 30, FontStyle.Bold), new SolidBrush(Color.Black), 10, 10);
        g.DrawImage(bb, 10, 100);
        //Bitmap ab = 
    }

    private void button1_Click(object sender, EventArgs e)
    {
        printDocument1.Print();
    }

    private void Form1_Paint(object sender, PaintEventArgs e)
    {

    }

}

}

Bitmap bb = BarCodeTest.ControlBitmap.getControlBitmap(axBarCodeCtrl1);
bb.Save()保存到文件看看生成的bmp有没有问题。

最好就使用picturebox, 如果使用printDocument里面Draw之后, 再让PrintDocument。update一下试一下