Page 1 of 1

MDI Application Sample?

Posted: Wed Nov 15, 2006 4:05 pm
by Mark Smith
Is there a sample application showing the use of StimulReport in an MDI application?

MDI Application Sample?

Posted: Thu Nov 16, 2006 1:55 am
by lcruiser
I use the following code which link to an menuitem on an MDI. I also disable the standard menu and save it to a file then load just before I create the report form.

Hope this help.


Code: Select all

        private void OnClickNew(object sender, EventArgs e)
        {
            StiConfig.Load(@"C:\Report\ReportNoMenuFullConfig.xml");

            StiReport report = new StiReport();

            report.Design(this);
            report.Designer.FormBorderStyle = FormBorderStyle.Sizable;
            report.Designer.WindowState = FormWindowState.Normal;
        }

MDI Application Sample?

Posted: Thu Nov 16, 2006 7:55 am
by Mark Smith
Hi lcruiser -

Many thanks. I'd seen a problem with the MDI 'master' window gaining too many maximize/minimize/close icons when activating the report preview window and your suggestion fixed it. Looks like I'm good to go once I've nuked the default main menu service.


MDI Application Sample?

Posted: Thu Nov 16, 2006 7:27 pm
by Vital
You can use one of property of StiMainMenu service for control MainMenu type:

Code: Select all

StiMainMenuService mainMenu = StiConfig.Services.GetService(typeof(StiMainMenuService)) as StiMainMenuService;
mainMenu.MainMenuType = StiMainMenuType.Enhanced;
mainMenu.MainMenuType = StiMainMenuType.Standard;
Thank you.