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
Behrouz Hosseini
NA
72
0
Problem with Minimized Main Form
Oct 26 2011 5:27 AM
Hi Guys
Can you please take a look at following app to see what I am doing wrong?
Download App(WinFormsStarts)
What I want to do is running multiple modal forms AND keeping the MainApp form accessible until finishing all required modals.As you can see from the application, as soon as you run the program the MainApp form (in Maximized windows State) and the Welcome form pops up.
till here everything is fine but when I chose the "Start New Project" the QuickStart form pops up BUT the MainApp minimize which is not meant to be.
This issue also happen when user chose the "Start Existing Project" then the MainApp minimize again and the Open dialog appear on the screen.
Here are the codes ,as well:
1- MainApp
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
WinFormStarts
{
public
partial
class
MainApp : Form
{
public
MainApp
()
{
InitializeComponent
()
;
}
private
void
MainApp_Load
(
object
sender, EventArgs e
)
{
Welcome welcomeForm =
new
Welcome
()
;
welcomeForm.ShowDialog
()
;
}
}
}
2- Welcome Form
using
System.ComponentModel;
using
System.Data;
using
System.Drawing;
using
System.Linq;
using
System.Text;
using
System.Windows.Forms;
namespace
WinFormStarts
{
public
partial
class
Welcome : Form
{
public
Welcome
()
{
InitializeComponent
()
;
}
private
void
btnExisting_Click
(
object
sender, EventArgs e
)
{
this
.Hide
()
;
OpenFileDialog dlg =
new
OpenFileDialog
()
;
dlg.ShowDialog
()
;
}
private
void
btnCancel_Click
(
object
sender, EventArgs e
)
{
this
.Close
()
;
Application.Exit
()
;
}
private
void
btnNew_Click
(
object
sender, EventArgs e
)
{
this
.Hide
()
;
QuickStart qs =
new
QuickStart
()
;
qs.ShowDialog
()
;
}
}
}
3- QuickStart Form
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
WinFormStarts
{
public
partial
class
QuickStart : Form
{
public
QuickStart
()
{
InitializeComponent
()
;
}
private
void
button2_Click
(
object
sender, EventArgs e
)
{
this
.Close
()
;
Application.Exit
()
;
}
private
void
button1_Click
(
object
sender, EventArgs e
)
{
this
.Close
()
;
}
}
}
Please let me know what is wrong with this apss. Thanks for your time in advanced
Reply
Answers (
3
)
How can i Save captured images from webcam with different file names
Crystal Reports