CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2007
    Posts
    5

    new windows::form

    Hi,

    I am currently developing an application which deals with image processing (in visual c++ 2008 express). In the main form, images are displayed : before one algorithm is applied, and after the algorithm is applied. (before/ after process).

    What I want is :
    - another form to be displayed, near the main one, in which the histogram of the image is displayed;

    So my question is : how to create a new form which can be visible all the time, near the main form.
    Note : i do not need to click inside or do other operations, it should just be there, visible.

    Sorry for my bad english. I am looking forward to receiving your response. (some pieces of code would be really helpful).

    Alex

  2. #2
    Join Date
    Jul 2002
    Posts
    2,543

    Re: new windows::form

    Add new Windows Form to the project (Project - Add New Item - UI - Windows Form). Let's say you call it HistogramForm. Add this line to the main form h-file:

    #include "HistogramForm.h"

    Add class member to main form class:

    HistogramForm^ m_histForm;

    In the place where you want to show this form, write:

    m_histForm = gcnew HistogramForm();
    m_histForm->Show(this);

    If you have more questions about Windows Forms, post them in C++/CLI forum.

  3. #3
    Join Date
    Nov 2007
    Posts
    5

    Re: new windows::form

    thank you a lot

    in my old piece of code i wrote :

    Histogram_window^ hw = gcnew Histogram_window();
    hw->Show ();

    so, thank you for telling me that it was

    hw->Show(this);

    the right code.

    It works
    Thanks a lot

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