CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 9 of 9
  1. #1
    Join Date
    Aug 2000
    Posts
    670

    Question Building windows application

    When I create a new project, I can start windows application.
    In this project there is by default a form.
    How do I create an application like SDI application (something that looks like notepad).

  2. #2
    Join Date
    Nov 2002
    Location
    Singapore
    Posts
    1,890
    there isn't a built in support like VC++ did
    In VC++ you could make Notepad easily

    in C#
    may be you could search for .wiz files which is known as wizard files which can generate-automate the project for you.

    Paresh

  3. #3
    Join Date
    Jul 2002
    Location
    .NET 2.0/.NET 3.0/.NET 3.5 VS2005/VS2008
    Posts
    284
    Create a new windows forms application in C#, add a richtextbox to your form and a mainmenu, fit in some menu items like: File->New; File->Open; File->Save; File->Exit. Then you will need a fileSaveDialog and a FileOpenDialog. Put code behind the menu items open and save to call these dialogs the open or save the file made in the richtextbox. It shouldn't be that hard to make

    I will post a sample for you.
    WM.

    What about weapons of mass construction?

  4. #4
    Join Date
    Jul 2002
    Location
    .NET 2.0/.NET 3.0/.NET 3.5 VS2005/VS2008
    Posts
    284
    Here's the sample
    Attached Files Attached Files
    WM.

    What about weapons of mass construction?

  5. #5
    Join Date
    Aug 2000
    Posts
    670

    Question

    10x a lot for your sample.
    I saw the MSDN sample scribble.
    There is instead of the form a "MainWindow", and inside there is a MdiClient.
    Do you know how can I do it?

  6. #6
    Join Date
    Jul 2002
    Location
    .NET 2.0/.NET 3.0/.NET 3.5 VS2005/VS2008
    Posts
    284
    You will need to make another form. In this form you place the richtextbox from form1.
    Also you need to set IsMdiForm to true (of form1).

    The code in MenuItem2_Click will need to be replaced with this:

    Form2 frm = new Form2();

    frm.MdiParent = this;
    frm.Show();

    Also the other functions will need to be different. I will post a sample for that tomorrow
    WM.

    What about weapons of mass construction?

  7. #7
    Join Date
    Nov 2002
    Location
    Singapore
    Posts
    1,890
    i should say
    handling MDI application is bit tricky..
    need to keep track of current window etc..

  8. #8
    Join Date
    Jul 2002
    Location
    .NET 2.0/.NET 3.0/.NET 3.5 VS2005/VS2008
    Posts
    284
    Yep, it sure is

    I am really sorry, I will be out for a few days. So, that sample is coming a little bit later.
    WM.

    What about weapons of mass construction?

  9. #9
    Join Date
    Nov 2002
    Location
    Singapore
    Posts
    1,890
    Herez the MDI application that you are looking for.
    Attached Files Attached Files
    - Software Architect

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured