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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T17:01:25+00:00 2026-05-24T17:01:25+00:00

I have a Visual C++ forms application for Windows, using Visual Studio 2010. I

  • 0

I have a Visual C++ forms application for Windows, using Visual Studio 2010. I want to fire off a thread under this event:

private: System::Void Form1_Shown(System::Object^  sender, System::EventArgs^  e) {

}

How can I do this? I have been searching for hours and it doesn’t seem to work for me 🙁 can someone show me how I need to set up a thread that runs another method, and how to set up that method, and everything else (declarations, namespaces you use, etc)?

  • 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-24T17:01:27+00:00Added an answer on May 24, 2026 at 5:01 pm

    If you want to explore Visual C++, you will probably be better off working with unmanaged C++, and creating your application using the Win32 API and MFC for the GUI. C++/CLI is a very powerful language, but it basically requires you to know both C++ and C# before you even get started.

    That said, here’s how you do it:

    using namespace System;
    using namespace System::Threading;
    
    static void MyThreadFunc()
    {
       // Insert code to be run on the other thread here.
    }
    
    void Form1_Shown(Object^ sender, EventArgs^ e)
    {
        Thread^ thread = gcnew Thread(gcnew ThreadStart(&ClassName::MyThreadFunc));
        // If MyThreadFunc is an instance method, use "gcnew ThreadStart(this, &ClassName::MyThreadFunc)" to get the delegate.
        thread->Start();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using Visual Studio 2008, c#, .net 2.0. I have a Windows Forms client application
I have a Visual Studio 2010 Windows Forms application in which I start a
I'm using Visual Studio 2010 Ultimate. In a simple Windows application I just want
I am creating a Windows Forms Application using Visual Studio 2010. I populate data
I have a Windows Forms application in C#/Visual Studio 2008 with an IE WebBrowser
I have a simple Windows Forms (C#, .NET 2.0) application, built with Visual Studio
QUESTION - If I'm starting a Windows Forms application in C# using Visual Studio
I am building a Windows Application using Visual Studio 2008. For the forms (2
I am working on creating a Windows Forms Application in C++ using Visual Studio
When building a Windows Forms project in Visual Studio 2010 I have a following

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.