[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Showing MDI Application like SDI

Posted on 2003-10-27
7
Medium Priority
?
242 Views
Last Modified: 2010-05-18
Hi,

I am trying to develop an MDI Application in C# Which should appear like SDI. To achieve this, We have created a parent form, and make all other forms MDI children.


We keep one children active in parent form. All the navigation is controlled from tollbar, menubar present on parent. We open child form in maximized state and its Control box, ShowInTaskBar properties are also set to false. But still it shows child form's top bar on some forms, while all other forms behave nicely.








0
Comment
Question by:Yassar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
7 Comments
 
LVL 23

Expert Comment

by:Roshan Davis
ID: 9631904
For that you have to remove the close button of ChildFrame and maximize the child window when it activates...

This will do both


Override PreCreateWindow, ActivateFrame of CChildFrame and do the follwoing


BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs)
{
      // TODO: Modify the Window class or styles here by modifying
      //  the CREATESTRUCT cs

      cs.style &= ~WS_SYSMENU;
      if( !CMDIChildWnd::PreCreateWindow(cs) )
            return FALSE;

      return TRUE;
}


void CChildFrame::ActivateFrame(int nCmdShow)
{
      if (nCmdShow == -1)
        nCmdShow = SW_SHOWMAXIMIZED;
            
      CMDIChildWnd::ActivateFrame(nCmdShow);
}

Good Luck
0
 

Author Comment

by:Yassar
ID: 9631937
Thanks for tip, But how to achieve it in C#
0
 
LVL 23

Expert Comment

by:Roshan Davis
ID: 9631954
Ooops, I donno C# :o(
Rosh
0
 
LVL 23

Accepted Solution

by:
Roshan Davis earned 1000 total points
ID: 9631971
http://www.codeproject.com/csharp/sdimdiwizards.asp - C# SDI/MDI Application wizards
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
The SignAloud Glove is capable of translating American Sign Language signs into text and audio.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Introduction to Processes

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question