Image Slider in Windows form Application C#
Image Slider in Windows form Application C#
Hello friend’s in this tutorial I’ll show you how to Design an Image Slider in windows form application in C#
Create new windows Form application in visual studio. follow the steps
add two panels and set dock top and bottom.
add some buttons on top panel and bottom panel.
add picture box in center of form.
and add timer.
Click On Solution Explorer=>Project Name=>Open Folder in file Explorer=> Bin =>Debug=> create new folder and add some images
Add the Code below in form.cs
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace ImageSlider { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private int imageno = 1; private void loadimage() { if (imageno==11) { imageno = 1; } pictureBox1.ImageLocation = string.Format(@"Images\{0}.jpg",imageno); imageno++; } private void panel3_Paint(object sender, PaintEventArgs e) { } private void timer1_Tick(object sender, EventArgs e) { loadimage(); } } }
Video tutorial
Thank you for reading this article. Please don’t forget to subscribe our official YouTube Channel RashiCode