using System.Resources;
using System.Reflection;
private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
{
if (this.listBox1.SelectedItem != null && listBox1.Text.Equals("支票"))
{
textBox1.Text = this.listBox1.SelectedItem.ToString();
ResourceManager rm = new ResourceManager("property.Properties.Resources", Assembly.GetExecutingAssembly());
this.pictureBox1.Image = (Bitmap)rm.GetObject("支票");
}
if (this.listBox1.SelectedItem != null && listBox1.Text.Equals("电汇凭证"))
{
textBox1.Text = this.listBox1.SelectedItem.ToString();
ResourceManager rm = new ResourceManager("property.Properties.Resources", Assembly.GetExecutingAssembly());
this.pictureBox1.Image = (Bitmap)rm.GetObject("电汇凭证");
}
}