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
pete.mcnamee
NA
11
0
mdi application
Dec 10 2003 2:36 AM
I am having trouble communicating with my mdiParent from a child form. I am trying enable some menu items on the mdi parent when a user logs in successfully in frmLogin. I am able to pass info to setPermissions(bool enabled) and I step through the code and it shows that each menu item's enabled property is changed to true but when I go up to the menu again they are still not enabled. what should i do? this code is in the parent: public void setPermissions(bool access) { this.mnuLogon.Enabled = !access; this.mnuLogout.Enabled = access; this.mnuSpending.Enabled = access; this.mnuCurrent.Enabled = access; this.mnuTransactions.Enabled = access; this.mnuDebt.Enabled = access; } this is the code in the child: private void cmdOK_Click(object sender, System.EventArgs e) { int login = data.login(txtLogin.Text.ToString(), txtPassword.Text.ToString()); switch(login) { case 0: MessageBox.Show("Invalid Login Name or Password"); txtLogin.Focus(); break; case 1: frm.setPermissions(true); this.Hide(); break; case 2: frm.setPermissions(true); this.Hide(); break; default: MessageBox.Show("Invalid Login Name or Password"); txtLogin.Focus(); break; } } am i missing something obvious? I am fairly new to C#. Thanks, Pete
Reply
Answers (
2
)
Input control and web page
Strange charaters when outputting to html file