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 7540467
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T07:39:04+00:00 2026-05-30T07:39:04+00:00

If I have a C++/CLI form with textbox1 and a class called Dummy in

  • 0

If I have a C++/CLI form with textbox1 and a class called Dummy in another header file, what can I do if I want to change “directly” the value of textbox1.Text by a function exists in Dummy class?

  • 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-05-30T07:39:05+00:00Added an answer on May 30, 2026 at 7:39 am

    C++ does single-pass compilation. That means you can’t use something until the compiler has already seen it.

    When you have two classes using each other mutually, that can be tricky. Luckily C++ also allows forward declaration, which tells the compiler “Here is the signature for a class or function I’m going to provide you with later”.

    In general, provide the compiler with the following, in this order:

    • forward declaration of classes

      ref class Dummy;
      ref class MyForm;
      
    • class definitions

      ref class Dummy { ... };
      ref class MyForm { ... };
      
    • class member function definitions

      void Dummy::DoIt()
      {
          myForm->textBox1->Text = whatever;
      }
      

    Often, the only thing needed is to put function definitions in a .cpp file, and make sure that .cpp file #includes the header file for every class. For your problem, that’d mean you should put this line in Dummy.cpp, which includes both Dummy.h and myform.h.

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

Sidebar

Related Questions

I understand that a .exe PE file can have CLI code in it. But
I have a CLI script and want it to read data from a file.
I have a library written in C++/CLI and I want to open it up.
I have a php script that is running in CLI and I want to
I have a C++/CLI project which has a child form with some control components.
I am using Visual C++ 2008 with CLI. I have a form with a
I am uploading a file with FTPLib in python and have a cli loadingbar
I have a CLI/C++ interface that I want to examine via .NET Reflection. Here's
I have a windows forms app written in C++/cli. I want to extend this
I have a CLI program consisting of a single vt.c file that compiles and

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.