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();