我在這裏有一個情況。我需要使用Visual Studio 2010中的C#在Windows窗體中創建員工卡結構。該結構可能包含具有白色背景的標籤和圖片框。我沒有創建它的問題,但我也給這個表單上的一個名爲「打印」的按鈕,以便用戶可以打印該卡。我搜索了它,但沒有找到具體的東西。 請幫我一把。在Windows Form C中打印面板#
namespace Employee_Card_Manager
{
public partial class Card : Form
{
public Card(String a, String b, String c, String d, String e, String f, String g, String h, String i)
{
InitializeComponent();
this.label2.Text = a;
this.label9.Text = b;
this.label10.Text = c;
this.label11.Text = d;
this.label12.Text = e;
this.label13.Text = f;
this.label14.Text = g;
this.label16.Text = h;
this.pictureBox1.Image = Image.FromFile(i);
Image myimg = Code128Rendering.MakeBarcodeImage(h, 2, true);
this.pictureBox2.Image = myimg;
}
private void button1_Click(object sender, EventArgs e)
{
//Print Card Code
}
}
}
該卡模板是如下:
我已經放置在面板控制所有卡的結構和設置的面板背景爲白色。你可以填寫打印此卡的代碼嗎? 感謝
看到這個http://msdn.microsoft.com/en-us/library/6he9hz8c.aspx – Rahul
的StackOverflow是不是一個網站,有專業的開發人員爲你做免費的工作。這是專業開發人員就真實問題和答案進行協作的地方。在嘗試實施具有特定問題的打印功能後,請回來,以瞭解爲什麼無法使用它。請顯示努力,研究,代碼和一個具體問題。 –