comeonbabe_
comeonbabe_
采纳率63.6%
2017-06-01 13:54

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

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条回答

  • guwei4037 极简吧 4年前

    private int index;

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

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

    做个判断

    点赞 评论 复制链接分享

相关推荐