剩下实在不知道该怎么写了,求大家看一下吧

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;
using System.Collections;

namespace WindowsFormsApplication24
{
public partial class Form1 : Form
{
ArrayList imglist = new ArrayList();

public Form1()
{
InitializeComponent();
}

    private void 文件FToolStripMenuItem_Click(object sender, EventArgs e)
    {

    }

    private void Form1_Load(object sender, EventArgs e)
    {

    }

    private void 帮助HToolStripMenuItem_Click(object sender, EventArgs e)
    {

    }

    public void 打开OToolStripMenuItem_Click(object sender, EventArgs e)
    {
        OpenFileDialog oFD = new OpenFileDialog();
        oFD.Filter = "图像|*.jpg;*.gif;*.png";
        if (oFD.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            pictureBox1.Load(oFD.FileName);
        imglist.Add(oFD.FileName);


    }

}

}
剩下的是上一张下一张的按钮,但是我不知道该怎么写,网上面的太乱了

1个回答

private int index;

下一张
index++;
pictureBox1.Load(imglist[index]);

上一张
index--;
pictureBox1.Load(imglist[index]);

做个判断

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问