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
David Smith
NA
2k
0
c# opendialogbox
Mar 17 2010 1:28 AM
Hi, Can someone give me some assistance with the dialog box, I want to be able to select multiple files at once , instead of one file at a time, How do I go by doing that.
the code snippet that i have so far below
public OpenFileDialog Cif_OpenDialogBox(OpenFileDialog openFileDialog1)
{
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
Stream myStream;
if ((myStream = openFileDialog1.OpenFile()) != null)
{
// Insert code to read the stream here.
Console.WriteLine(openFileDialog1.FileName);
myStream.Close();
}
}
return openFileDialog1;
}
public SaveFileDialog Cif_SaveDialogBox(SaveFileDialog saveFileDialog1)
{
saveFileDialog1.Filter = "txt files (*.txt)|*.txt|All files (*.*)|*.*";
saveFileDialog1.FilterIndex = 2;
saveFileDialog1.RestoreDirectory = true;
if (saveFileDialog1.ShowDialog() == DialogResult.OK)
{
Stream myStream;
if ((myStream = saveFileDialog1.OpenFile()) != null)
{
// Insert code to read the stream here.
//saveFileDialog1.FileName = textBox1.Text;
Console.WriteLine(saveFileDialog1.FileName);
myStream.Close();
}
}
return saveFileDialog1;
}
Reply
Answers (
1
)
BackgroundWorker
Attach MailMessage as Attachment to a Mailmessage