accessing the controls in the activemdichild in c#?

Status
Not open for further replies.
This site is for VB.NET related inquiries only.

The Form class has a ActiveMdiChild property (of type Form), so this also has a Controls collection.
 
accessing activemdichild in c++.net 205

I have created a browser in vb.net C# and Im now making one in c++.net
Ive used a Windows application type for c++ and I need to navigate the webbrowser on the activemdichild.
In vb.net i used
VB.NET:
dim child as form1 = TryCast(form1,activemdichild)
and in c# I used
VB.NET:
Form activeChildForm = this.ActiveMdiChild;

            if (activeChildForm != null)
            {
                WebBrowser activewebbrowser = (WebBrowser)activeChildForm.ActiveControl;
                if (activewebbrowser != null)
                    activewebbrowser.Navigate(toolStripComboBox1.Text);
            }
For c++ I tried
VB.NET:
 Form^ activeChildForm = this->ActiveMdiChild;
                WebBrowser^ activewebbrowser = (WebBrowser^)activeChildForm->ActiveControl;
               activewebbrowser->Navigate(toolStripComboBox1->Text);
it doesnt give me any errors on compile time but when I run the application nothing happens, Im not able to navigate the activemdichild webbrowser
Colud'nt find help anywhere.Please help
 
Last edited:
Status
Not open for further replies.
Back
Top