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;
namespace PictureView
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void btnSelectPic_Click(object sender, EventArgs e)
{
//Show the open file dialog box.
try
{
if (ofdSelect.ShowDialog() == DialogResult.OK)
{
//Load the picture into the picturebox.
picShow.Image = Image.FromFile(ofdSelect.FileName);
//Display the name of the file.
this.Text = string.Concat("Picture Viewer (" + ofdSelect.FileName + ")");
}
}
catch (Exception fe)
{
MessageBox.Show(""+fe+"","Error Message",MessageBoxButtons.OK,MessageBoxIcon.Error);
}
}
private void btnQuit_Click(object sender, EventArgs e)
{
try
{
this.Close();
}
catch (Exception fe)
{
MessageBox.Show(""+fe);
}
}
}
}
How do i code the trackbar to view the rest of the pictures in a folder.
No replies to this topic
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account

Back to top









