TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
jimmy naik
NA
21
78.6k
add image to picture box
Oct 18 2009 1:31 PM
//hello friends this my code to add images to checklist box.now when i select an image i want the preview of that image to be shown in the picture box.can somebody show me the code for that?..thank u//
private void button3_Click(object sender, EventArgs e)
{
if (folderBrowserDialog1.ShowDialog() == DialogResult.OK)
{
DirectoryInfo FileDirectory = new DirectoryInfo(folderBrowserDialog1.SelectedPath);
//FileInfo[] FilesFromDirectory = FileDirectory.GetFiles();
FileInfo[] FileJpg = FileDirectory.GetFiles("*.jpg");
FileInfo[] FileGif = FileDirectory.GetFiles("*.gif");
FileInfo[] FileBmp = FileDirectory.GetFiles("*.bmp");
FileInfo[] FileTif = FileDirectory.GetFiles("*.tif");
FileInfo[] FilePng = FileDirectory.GetFiles("*.png");
foreach (FileInfo File in FileJpg)
{
checkedListBox1.Items.Add(File.Name);
}
foreach (FileInfo File in FileGif)
{
checkedListBox1.Items.Add(File.Name);
}
foreach (FileInfo File in FileGif)
{
checkedListBox1.Items.Add(File.Name);
}
foreach (FileInfo File in FileTif)
{
checkedListBox1.Items.Add(File.Name);
}
foreach (FileInfo File in FilePng)
{
checkedListBox1.Items.Add(File.Name);
}
}
}
Reply
Answers (
1
)
OpenFileDialog can't see partitions in My Computer
Access database locally