如何在pictureBox中使用一些图片并在2秒后更改 [英] How can using some pictures and changing after 2 seconds in pictureBox

查看:85
本文介绍了如何在pictureBox中使用一些图片并在2秒后更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好。

我需要帮助

此图片



http://www.webchinupload.com/f/2014-07/b78188d6d36d4106192a7f1e5c2f03cf.jpg

推荐答案

你可以试试这些:



http://www.java-scripts.net/javascripts/Automatically-Changing-Slide -Show-Script.phtml



http://freejavascriptslideshow.com/ [ ^ ]







http://www.mindfiresolutions.com/How-To-Change-An-Image-Periodically-With-Timer-Control-Using-UpdatePanel-In-ASPNET-625.php [ ^ ]
you can try these:

http://www.java-scripts.net/javascripts/Automatically-Changing-Slide-Show-Script.phtml

http://freejavascriptslideshow.com/[^]



http://www.mindfiresolutions.com/How-To-Change-An-Image-Periodically-With-Timer-Control-Using-UpdatePanel-In-ASPNET-625.php[^]


你好
bilalali





使用此代码。

这里重命名图像名称包含Image1,Image2等...









use this code.
Here Rename the Image name with Image1,Image2 so on...



using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace imageslider
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        int i = 0;
        private void Form1_Load(object sender, EventArgs e)
        {
            timer1.Start();

        }

        private void timer1_Tick(object sender, EventArgs e)
        {
            ++i;
            pictureBox1.Image =System.Drawing.Image.FromFile("F:/Sandeep/Wcf/imageslider/imageslider/Image/image"+i+".jpg");
            if (i == 4)
            {
                i = 0;
            }
        }
    }
}





注意



NOTE

Set Interval Property of Timer control with 200 Miliseconds







希望这个帮助您



快乐编码




Hope This Help You

Happy Coding


这篇关于如何在pictureBox中使用一些图片并在2秒后更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆