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

Managed C++/CLI

 
Questioncast to a stored type Pin
Xeef12-Jun-07 11:56
Xeef12-Jun-07 11:56 
QuestionRe: cast to a stored type Pin
Mark Salsbery12-Jun-07 14:10
Mark Salsbery12-Jun-07 14:10 
QuestionSDL game engine Pin
HawkAgent12-Jun-07 2:39
HawkAgent12-Jun-07 2:39 
Question Stop Closing the main Dialog when a child Dailog is open? Pin
granshah @ eVisionISF12-Jun-07 2:33
granshah @ eVisionISF12-Jun-07 2:33 
AnswerRe: Stop Closing the main Dialog when a child Dailog is open? Pin
Christian Graus12-Jun-07 11:30
protectorChristian Graus12-Jun-07 11:30 
Questionwindows schedular is not working Pin
srinivassam11-Jun-07 20:43
srinivassam11-Jun-07 20:43 
AnswerRe: windows schedular is not working Pin
Christian Graus11-Jun-07 21:16
protectorChristian Graus11-Jun-07 21:16 
Questionmain form instance name Pin
aaron_leese11-Jun-07 19:45
aaron_leese11-Jun-07 19:45 
I feel like a bit of a newbie asking this, but I have never had to access elements on the main form from outside it before.

So here it is: I need to access a textbox from a cpp file .... the textbox is on the main form which is initialized in the main function ... with the usual Application::Run.

in the main cpp file:

..........................................

#include "Form1.h"

int main(array ^args)
{

Application::Run(gcnew Form1());

Form1::textBox1->Text = "some text";

}
...........................................

This doesn't work of course, because I am referencing the header class itself, and not the form instance .... but what is the form instance ????


now ... I know I could use ...

Form1^ myForm = gcnew Form1;
myForm->ShowDialog();

except that gcnew objects cannot be declared globally, and I need to access some of the form elements from other parts of the code, not main().

So I'm stuck .... any help would be appreciated.

Thanks
Aaron

AnswerRe: main form instance name Pin
led mike12-Jun-07 4:28
led mike12-Jun-07 4:28 
GeneralRe: main form instance name Pin
aaron_leese12-Jun-07 15:10
aaron_leese12-Jun-07 15:10 
GeneralRe: main form instance name Pin
led mike13-Jun-07 7:02
led mike13-Jun-07 7:02 
AnswerRe: main form instance name Pin
Mark Salsbery13-Jun-07 7:57
Mark Salsbery13-Jun-07 7:57 
GeneralRe: main form instance name Pin
aaron_leese13-Jun-07 18:41
aaron_leese13-Jun-07 18:41 
QuestionRetrieve FileVersion of an exe Pin
IamPoojaa11-Jun-07 1:45
IamPoojaa11-Jun-07 1:45 
AnswerRe: Retrieve FileVersion of an exe Pin
Mark Salsbery11-Jun-07 7:55
Mark Salsbery11-Jun-07 7:55 
Questionstill reflecting / major problem Pin
Xeef10-Jun-07 5:16
Xeef10-Jun-07 5:16 
Questionadding char arrays together for one function arg Pin
NZSmartie9-Jun-07 17:54
NZSmartie9-Jun-07 17:54 
QuestionReflection how to cast to loaded type Pin
Xeef9-Jun-07 10:07
Xeef9-Jun-07 10:07 
AnswerRe: Reflection how to cast to loaded type Pin
sarah_malik9-Jun-07 12:03
sarah_malik9-Jun-07 12:03 
GeneralRe: Reflection how to cast to loaded type Pin
Xeef9-Jun-07 13:10
Xeef9-Jun-07 13:10 
QuestionC++ dll problem Pin
sujithkumarsl8-Jun-07 0:11
sujithkumarsl8-Jun-07 0:11 
AnswerRe: C++ dll problem Pin
Mark Salsbery8-Jun-07 4:41
Mark Salsbery8-Jun-07 4:41 
QuestionBest way to learn C++ Pin
Brad Fackrell7-Jun-07 7:46
Brad Fackrell7-Jun-07 7:46 
AnswerRe: Best way to learn C++ Pin
Christian Graus7-Jun-07 12:32
protectorChristian Graus7-Jun-07 12:32 
GeneralRe: Best way to learn C++ Pin
Brad Fackrell8-Jun-07 3:03
Brad Fackrell8-Jun-07 3:03 

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.