Click here to Skip to main content
15,892,927 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
QuestionUpdating form controls outside of form file Pin
Lavake14-Mar-09 11:14
Lavake14-Mar-09 11:14 
Hi,

I'm new to C++ (and these forums), but I have some experience with Java, PHP and several other languages though.

I made a Windows forms application and would like to know an easy way to update the form controls of the mainform, from any cpp file, function, etc... in my project.

For example, a function (outside the form header file) should be able to update a textfield in the form, during its execution. What would be the best way to do this in C++?

In the main function, I tried this:
MainForm^ mainform = gcnew MainForm();
Application::Run(mainform);
mainform->txtUpdates->Text = "test";


But this doesn't work. Can anyone help?

Thanks in advance!
AnswerRe: Updating form controls outside of form file Pin
N a v a n e e t h14-Mar-09 16:28
N a v a n e e t h14-Mar-09 16:28 
GeneralRe: Updating form controls outside of form file Pin
Lavake15-Mar-09 4:06
Lavake15-Mar-09 4:06 
GeneralRe: Updating form controls outside of form file Pin
N a v a n e e t h15-Mar-09 5:21
N a v a n e e t h15-Mar-09 5:21 
QuestionProblem to communicate between forms [modified] Pin
roshihans14-Mar-09 3:44
roshihans14-Mar-09 3:44 
AnswerRe: Problem to communicate between forms Pin
N a v a n e e t h14-Mar-09 6:00
N a v a n e e t h14-Mar-09 6:00 
GeneralRe: Problem to communicate between forms Pin
roshihans14-Mar-09 16:08
roshihans14-Mar-09 16:08 
GeneralRe: Problem to communicate between forms Pin
N a v a n e e t h14-Mar-09 16:21
N a v a n e e t h14-Mar-09 16:21 
GeneralRe: Problem to communicate between forms Pin
roshihans14-Mar-09 17:33
roshihans14-Mar-09 17:33 
GeneralRe: Problem to communicate between forms Pin
N a v a n e e t h15-Mar-09 5:14
N a v a n e e t h15-Mar-09 5:14 
GeneralRe: Problem to communicate between forms Pin
roshihans15-Mar-09 18:12
roshihans15-Mar-09 18:12 
QuestionDelegates for instance methods between AppDomains... Pin
MrBhbk11-Mar-09 10:28
MrBhbk11-Mar-09 10:28 
QuestionSingle Textbox EventHandler for all Pin
Badboy22TR9-Mar-09 14:23
Badboy22TR9-Mar-09 14:23 
AnswerRe: Single Textbox EventHandler for all Pin
ky_rerun10-Mar-09 5:00
ky_rerun10-Mar-09 5:00 
AnswerRe: Single Textbox EventHandler for all Pin
Badboy22TR10-Mar-09 12:07
Badboy22TR10-Mar-09 12:07 
QuestionUpdating a label's text automatically? (New programmer) Pin
TabascoSauce9-Mar-09 12:50
TabascoSauce9-Mar-09 12:50 
GeneralRe: Updating a label's text automatically? (New programmer) Pin
Luc Pattyn9-Mar-09 13:09
sitebuilderLuc Pattyn9-Mar-09 13:09 
GeneralRe: Updating a label's text automatically? (New programmer) Pin
TabascoSauce9-Mar-09 14:10
TabascoSauce9-Mar-09 14:10 
QuestionInt64 minus.... Pin
Thilek8-Mar-09 6:46
Thilek8-Mar-09 6:46 
AnswerRe: Int64 minus.... Pin
Mark Salsbery8-Mar-09 9:19
Mark Salsbery8-Mar-09 9:19 
AnswerRe: Int64 minus.... Pin
Dave Doknjas8-Mar-09 13:56
Dave Doknjas8-Mar-09 13:56 
Question(C++/CLI) "FileNotFoundException" raised in "Activator::GetObject()" method of Remoting programming Pin
zkii4-Mar-09 3:08
zkii4-Mar-09 3:08 
AnswerRe: (C++/CLI) "FileNotFoundException" raised in "Activator::GetObject()" method of Remoting programming Pin
led mike4-Mar-09 4:41
led mike4-Mar-09 4:41 
GeneralRe: (C++/CLI) "FileNotFoundException" raised in "Activator::GetObject()" method of Remoting programming Pin
zkii4-Mar-09 16:54
zkii4-Mar-09 16:54 
GeneralRe: (C++/CLI) "FileNotFoundException" raised in "Activator::GetObject()" method of Remoting programming Pin
led mike5-Mar-09 4:28
led mike5-Mar-09 4:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.