Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Enabling/Disable Toolstrip buttons
Message
From
06/03/2006 00:36:59
 
 
To
05/03/2006 23:09:01
General information
Forum:
ASP.NET
Category:
Web forms
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Database:
MS SQL Server
Miscellaneous
Thread ID:
01101157
Message ID:
01101630
Views:
10
This message has been marked as the solution to the initial question of the thread.
OK, take the example I showed earlier, and plug your code into it:
namespace MyApp.New_Reports
{
    public partial class Wizard : MyApp.BaseForm
    {
        private MainForm oFormMain;

        public Wizard( MainForm oMain)
        {
            InitializeComponent();
            this.oFormMain = oMain;
        }

        private void Wizard_Load(object sender, EventArgs e)
        {
            this.oFormMain.next_ToolStripButton.enabled = false;
        }
    }
}
And then calling the wizard from your main form (notice how I pass the MainForm when instantiating the wizard form, by passing this):
Form iWizard = new New_Reports.Wizard(this);
iWizard.StartPosition = FormStartPosition.CenterParent;
iWizard.MdiParent = this;
iWizard.WindowState = FormWindowState.Maximized;
iWizard.Show();
~~Bonnie



>Hi Bonnie,
>
>The codes below is from the Wizard.cs. I know it's not much and that's why I am looking toward your feedback. Thanks again.
>
>using System;
>using System.Collections.Generic;
>using System.ComponentModel;
>using System.Data;
>using System.Drawing;
>using System.Text;
>using System.Windows.Forms;
>
>namespace MyApp.New_Reports
>{
> public partial class Wizard : MyApp.BaseForm
> {
> public Wizard()
> {
> InitializeComponent();
> }
>
> private void Wizard_Load(object sender, EventArgs e)
> {
> Main.next_ToolStripButton.enabled = false;
> }
>
>
> }
>}
>
>and this is how I called the Wizard.cs from the Main.cs
>
>Form iWizard = new New_Reports.Wizard();
>iWizard.StartPosition = FormStartPosition.CenterParent;
>iWizard.MdiParent = this;
>iWizard.WindowState = FormWindowState.Maximized;
>iWizard.Show();
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform