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
manas maadul
NA
3
1.8k
How can i handle multiple pannels in one button
Jul 22 2010 11:09 AM
hi
i'm tryed to develop ATM machine system and i have got trouble when i give multiple functions to button
the major problem is when i give
if(panel1.visible == true)
{
function1();
}
else
if((panel2.visible == true))
{
function2();
}
else
if(panel3.visible == true)
{
function3();
}
the button sometimes show the other panel's functions
how can i solve this problem??
this is the source code for 1 button
private void button8_Click(object sender, EventArgs e)
{
if (MPanel2.Visible == true)
{
MPanel2.Hide();
MPanel1.Show();
}
else
if (MPanel5.Visible == true)
{
MessageBox.Show("Please eject your card", "Message", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
}
else
if (MPanel7.Visible == true)
{
MPanel9.Hide();
MPanel8.Hide();
MPanel7.Hide();
MPanel6.Hide();
MPanel5.Hide();
MPanel4.Hide();
MPanel3.Hide();
MPanel2.Hide();
MPanel1.Show();
}
else
if (MPanel9.Visible == true)
{
ejectCardLabel.Visible = true;
}
}
Reply
Answers (
0
)
Why this does not work?
hw to stop code crashing when database is deleted and hw to let user insert info manually into database