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
shelly shelly
NA
1
2.1k
hadling multiple forms
Sep 15 2010 12:24 PM
Hi all,
Need a little help!!!
I want to create an windows application such that there are 2 forms:
form1 and form2
i want the form2 to be in background of form1 and form2 should be never seen(even when form1 is minimised,maximised,resized and if some other application is opened).
code i have used is:
Form2 obj = new Form2();
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
obj.Show();
}
private void Form1_Move(object sender, EventArgs e)
{
obj.Location = this.Location;
}
private void Form1_Resize(object sender, EventArgs e)
{
obj.Size = this.Size;
if (this.WindowState == FormWindowState.Minimized)
{
obj.Hide();
}
if (this.WindowState == FormWindowState.Normal)
{
obj.Show();
}
}
all the forms should be modeless dialogs(using show() function)
Using this, sometimes, i get the form2 loaded before loading form1, can this situation be avoided.? because i want the form2 always in background.
Thanks in advance.
Reply
Answers (
2
)
What collection type should I use?
simple array problem