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
Dorababu Meka
226
8.3k
1.7m
Not opening in an MDI
Jun 22 2010 4:40 AM
Hi all,
I have done an application using MDI. I have written a sample code to open form when i select a text file as follows
private void OpenFile(object sender, EventArgs e)
{
OpenFileDialog openFileDialog = new OpenFileDialog();
openFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
openFileDialog.Filter = "Text Files (*.txt)|*.txt|All Files (*.*)|*.*";
if (openFileDialog.ShowDialog(this) == DialogResult.OK)
{
// TODO: Add code here to open the file.
Form f = new form1();
f.MdiParent = this.MdiParent;
f.Show();
string FileName = openFileDialog.FileName;
}
}
But i am unable to open that form inside MDI... Can any one tell why
Reply
Answers (
2
)
Date validation
Error While getting the Path of the File