我想我需要将字符串s和位图bmp存储在一个数组中然后我想我必须在bmp数组中选择一个图像以显示在图片框中但我不确定如何。
public partial class capstoneProjectForm : Form
{
string imageName;
//string[] a;
Bitmap[] bit;
string[] folder;
int numOfPics;
int num = 0;
public capstoneProjectForm()
{
InitializeComponent();
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
// a = System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceNames();
string resFolder = System.IO.Path.Combine(System.Windows.Forms.Application.StartupPath, "Resources");
foreach (string s in Directory.EnumerateFiles(resFolder, "*.jpg"))
{
using (Bitmap bmp = new Bitmap(s))
{
}
if (s.Equals(imageName))
{
pictureBox.Image = ;
}
}