I can create and place WebBrowser controls at run time no problem.
But why can't I figure out how to get one of any number of created WebBrowser controls to navigate to a website?
I have a FORM a BUTTON and TWO TEXTBOX controls at design time. I run the program and it creates a random number of WEBBROWSER controls named WebBrowser1 to WebBrowser whatever.
textbox1.text = a number, 1 - max number of created webbrowsers, determined in whatever way it is. A user changes it, a random generated number, it doesn't matter.
textbox2.text = "www.google.com"
if textbox1.text = 4 when the button is clicked,
WebBrowser4.Navigate(textbox2.text)
but what if textbox1.text could equal 35, or 1, or whatever. HOW DO I REFERENCE IT'S ASSOCIATED WEBBROWSER CONTROL?!?!?
I've spent a few hours researching this and I find page after page on creating controls, but I can't change the data of a control determined at run time, and I can't find how to anywhere.
Please help!
Much thanks for even reading this!
Nick
But why can't I figure out how to get one of any number of created WebBrowser controls to navigate to a website?
I have a FORM a BUTTON and TWO TEXTBOX controls at design time. I run the program and it creates a random number of WEBBROWSER controls named WebBrowser1 to WebBrowser whatever.
textbox1.text = a number, 1 - max number of created webbrowsers, determined in whatever way it is. A user changes it, a random generated number, it doesn't matter.
textbox2.text = "www.google.com"
if textbox1.text = 4 when the button is clicked,
WebBrowser4.Navigate(textbox2.text)
but what if textbox1.text could equal 35, or 1, or whatever. HOW DO I REFERENCE IT'S ASSOCIATED WEBBROWSER CONTROL?!?!?
I've spent a few hours researching this and I find page after page on creating controls, but I can't change the data of a control determined at run time, and I can't find how to anywhere.
Please help!
Much thanks for even reading this!
Nick