liwanyi2012
2016-03-08 12:58c#我这样写代码后,为什么运行后窗体不显示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)
{
}
}
}
- 点赞
- 回答
- 收藏
- 复制链接分享
2条回答
为你推荐
- 此代码如何优化减少工作量,C# C# C# C#
- c#
- 4个回答
- C#/vb.net 在picturebox中的画图
- picturebox
- x
- c#
- 1个回答
- C# WinForm重写控件之后,显示的时候会先显示重写之前的控件 然后再变成重写之后的。。。
- 控件
- winform
- 继承
- c#
- 3个回答
- 程序媛小白求助:C#贪吃蛇精灵游戏
- 游戏
- 编程
- c#
- 4个回答
- C#中窗体按钮控件调用另一窗体的picturebox出现异常
- c#
- 1个回答
换一换