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

Managed C++/CLI

 
Generalpass data to vb6 dll Pin
NikoTanghe15-Sep-04 5:58
NikoTanghe15-Sep-04 5:58 
GeneralActiveX problem Pin
archetype14-Sep-04 1:34
archetype14-Sep-04 1:34 
GeneralLOGFONT structure Pin
AnsGe13-Sep-04 19:36
AnsGe13-Sep-04 19:36 
GeneralRe: LOGFONT structure Pin
ursus zeta15-Sep-04 13:37
ursus zeta15-Sep-04 13:37 
GeneralRe: LOGFONT structure Pin
AnsGe15-Sep-04 18:46
AnsGe15-Sep-04 18:46 
GeneralRe: LOGFONT structure Pin
george ivanov21-Sep-04 2:21
george ivanov21-Sep-04 2:21 
GeneralRe: LOGFONT structure Pin
ursus zeta21-Sep-04 14:11
ursus zeta21-Sep-04 14:11 
GeneralNewbie: Passing an object to a class Pin
jblau13-Sep-04 13:36
jblau13-Sep-04 13:36 
I am fairly new at programming; I am using Viusal Studio.net 2003.

Here is the problem I am trying to solve:

I have an MDI parent form which has a control. I also have a child form that needs to tell the control on the parent to do something.
I seem to be able to pass the control by reference to the child form class, and if I try to manipulate the control while still in the class constructor, everything works fine. However, when I try to access it elsewhere in the child form, i get an "undeclared identifier" error. Does anyone know how to fix it? Here is some code to show what I am doing:


THIS CODE IS IN THE PARENT FORM:

private: System::Void button2_Click(System::Object * sender, System::EventArgs * e)
{
FormChild2 *formChild2 = new FormChild2(myControl);
formChild2->MdiParent = this;
formChild2->Show();
}

THIS CODE IS IN THE FORMCHILD2 FORM:

public __gc class FormChild2 : public System::Windows::Forms::Form
{
public:
FormChild2(AxInterop::TWSLib::AxTws *myControl)
{
InitializeComponent();
myControl->connect("",7496,1);
}
};

SO while still in the class constructor I can use the "connect" property of the control, which I just passed by reference.
However, I want to be able to use that control after a button_click event while in the FormChild2 form. But that is when I get the "undeclared identifier" error.

Any suggestions would appreciated.

Thanks,

Jody Blau
GeneralRe: Newbie: Passing an object to a class Pin
AnsGe13-Sep-04 19:59
AnsGe13-Sep-04 19:59 
GeneralRe: Newbie: Passing an object to a class Pin
jblau14-Sep-04 3:10
jblau14-Sep-04 3:10 
GeneralNew Games Company Requires Programers Pin
KingsZone13-Sep-04 8:34
sussKingsZone13-Sep-04 8:34 
GeneralRe: New Games Company Requires Programers Pin
Christian Graus15-Sep-04 14:24
protectorChristian Graus15-Sep-04 14:24 
GeneralRe: New Games Company Requires Programers Pin
mayowa16-Sep-04 21:10
mayowa16-Sep-04 21:10 
GeneralNewbie: Create Events and EventHandlers Pin
jblau12-Sep-04 11:01
jblau12-Sep-04 11:01 
GeneralRe: Newbie: Create Events and EventHandlers Pin
Christian Graus15-Sep-04 15:11
protectorChristian Graus15-Sep-04 15:11 
GeneralReading file from OpenFileDialog. Pin
Link260010-Sep-04 13:05
Link260010-Sep-04 13:05 
GeneralRe: Reading file from OpenFileDialog. Pin
AnsGe14-Sep-04 4:44
AnsGe14-Sep-04 4:44 
Generalwondering for some help Pin
Anonymous10-Sep-04 4:26
Anonymous10-Sep-04 4:26 
GeneralRe: wondering for some help Pin
Christian Graus15-Sep-04 14:35
protectorChristian Graus15-Sep-04 14:35 
GeneralC# to managed C++ Pin
sreejith ss nair9-Sep-04 22:50
sreejith ss nair9-Sep-04 22:50 
GeneralRe: C# to managed C++ Pin
BAIJUMAX9-Sep-04 23:54
professionalBAIJUMAX9-Sep-04 23:54 
Generalaccess control in a derived class Pin
void()9-Sep-04 13:33
void()9-Sep-04 13:33 
GeneralAn unhandled exception has occurred in your application Pin
Waleed Eissa9-Sep-04 9:46
Waleed Eissa9-Sep-04 9:46 
Generalhelp!!!!! fork program Pin
nivsah7-Sep-04 14:33
nivsah7-Sep-04 14:33 
GeneralHELP!!I code due tomorrow Pin
benibo7-Sep-04 13:52
benibo7-Sep-04 13:52 

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.