Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8298157
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T15:39:58+00:00 2026-06-08T15:39:58+00:00

I have a project that contains two forms, Form1.h and Form2.h. The .cpp files

  • 0

I have a project that contains two forms, Form1.h and Form2.h.

The .cpp files of each is test.cpp and Form2.cpp.

I want to open the second form from the first through a button click, of which I already have the code for, placed inside the button1_Click method:

Form2 ^ form = gcnew Form2;
form->Show();

I have furthermore placed the include file in Form1.h (#include “Form2.h”), however I keep getting the following errors:

error C2065: 'Form2' : undeclared identifier

error C2065: 'form' : undeclared identifier

error C2061: syntax error : identifier 'Form2'

error C2065: 'form' : undeclared identifier

error C2227: left of '->Show' must point to class/struct/union/generic type

1>          type is ''unknown-type''

1>  Generating Code...

========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I have been searching a solution for a couple of days… none of which worked.
Any help would be appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T15:39:59+00:00Added an answer on June 8, 2026 at 3:39 pm

    Have you included Form1.h in test.cpp?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a project that uses two independent Android libraries. Each of them contains
Assume that I have a project that contains two buttons on it. Each buttons
I have a project that contains xml files. I also have an Ant build
I have a solution that contains two projects. One project is an ASP.NET Web
I have a Winform project built in .NET 4. It contains two forms and
I have two projects, my main android application and another test project that runs
I have two projects: A/B. Project A is the project that contains all of
I have a project that contains 2 web application and I want to use
We have a project that contains a library of Python and Scala packages, as
in the tomcat6 server I have a project that contains a servlet, I called

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.