none
data necessary to complete this operation is not yet available. (Exception from HRESULT: 0x8000000A) RRS feed

  • Question

  • unable to add new item-> ui ->windows form-> in clr empty project for c++ gui development
    Saturday, December 30, 2017 8:49 AM

All replies

  • Hi,

    What version of Visual studio do you use? It may be due to an incompatible version of the installation, trying to install the corresponding project template.

    If you use Visual tudio 2017, you should install following visual studio project template.

    https://marketplace.visualstudio.com/items?itemName=msdnprofilerk.CCLRWindowsFormsfurVisualStudio2017

    If you use Visual tudio 2015, you should install following visual studio project template.

    https://marketplace.visualstudio.com/items?itemName=msdnprofilerk.CCLRWindowsFormsfurVisualStudio2015

    Sincerely,

    Bob


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Monday, January 1, 2018 10:00 AM
    Moderator
  • Hi manoj,

    >>data necessary to complete this operation is not yet available. (Exception from HRESULT: 0x8000000A)

    Don't worry, close it and add the following code to the MyForm.cpp:

    using namespace System;
    using namespace System::Windows::Forms;
    
    [STAThreadAttribute]
    void Main(array<String^>^ args) {
    	Application::EnableVisualStyles();
    	Application::SetCompatibleTextRenderingDefault(false);
    	Project1::MyForm form;
    	Application::Run(%form);
    }

    Then save it and close the Visual Studio 2017, then reopen your Project.

    Note: When you reopen your Project, debug it first:

    And the display:


    Now you can do your options in the form by double click MyForm.h:



    Please refer to the completed steps for how to create a C++ Form project as below:

    Visual Studio 2017 - Windows Forms

    Best Regards,

    Stanly


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, January 2, 2018 6:43 AM
    Moderator
  • Potential solution:

    1) Add another MyForm2.h and then MyForm2.cpp.

    2) Compile the solution successfully. 

    3) restart the solution. This error message will be shown on MyForm2.h(design), and MyForm.h(design) can be displayed correctly now.

    4) remove MyForm2.h and then MyForm2.cpp from the solution. 

    Friday, October 11, 2019 7:02 AM