CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2017

    Exclamation Visual C++(CLR) How to add an item to a listbox from a different form

    So I am creating a windows app using windows forms in Visual C++, and I created this button in the main form (starting form) to open up a form called form 2. So to open this form I used form2's header to declare it and open it. From there form2 will load processes in a listbox and then u select a process you want from the list then click a button to add that selected item to another listbox in the starting form. But I have no idea on how to do it no matter what I do wether its forward declarations in other headers its just not working



  2. #2
    2kaud's Avatar
    2kaud is offline Super Moderator Power Poster
    Join Date
    Dec 2012

    Re: Visual C++(CLR) How to add an item to a listbox from a different form

    It would be helpful if you could post the code.
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++17 Compiler: Microsoft VS2017 (15.7.2)

  3. #3
    Join Date
    Jun 2010

    Re: Visual C++(CLR) How to add an item to a listbox from a different form

    Your description is pretty vague and yes, it would be helpful to see your code. But you mention forward declarations, which may be a hint into the direction of a mutual inclusion problem. Regarding this, see, for instance, http://forums.codeguru.com/showthrea...is-not-working
    I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.

    This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.

Tags for this Thread

Posting Permissions

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

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)