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)?
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: