Cool4 Posted February 8, 2004 Share Posted February 8, 2004 how to create a array of forms? i tried: dim frm(i) as form frm(1).show but it gives me a error "Object reference not set to an instance of an object." can someone help, please? Link to comment https://www.neowin.net/forum/topic/139478-vbnet-array-of-forms/ Share on other sites More sharing options...
0 bangbang023 Veteran Posted February 8, 2004 Veteran Share Posted February 8, 2004 this is the code I use: Public noteform As ArrayList then I declare in another function using "number" which is an integer variable noteform.Add(New formNote1) noteform(number) = New formNote1 Link to comment https://www.neowin.net/forum/topic/139478-vbnet-array-of-forms/#findComment-1707894 Share on other sites More sharing options...
0 Cool4 Posted February 8, 2004 Author Share Posted February 8, 2004 could you explain it a little more??? i didn't understand it :blush: Link to comment https://www.neowin.net/forum/topic/139478-vbnet-array-of-forms/#findComment-1708096 Share on other sites More sharing options...
0 bangbang023 Veteran Posted February 8, 2004 Veteran Share Posted February 8, 2004 ok, i have created a form in the designer called form1. Now in order to create an array of that form I first must declare the array: Public noteform As ArrayList Now that the array is declared, I can start to add forms to it. To add the new form, I need 2 lines of code: noteform.Add(New formNote1) noteform(number) = New formNote1 Now "number" is an integer variable I have set up. You can feed an "i" in there as you put in your original code. Link to comment https://www.neowin.net/forum/topic/139478-vbnet-array-of-forms/#findComment-1708152 Share on other sites More sharing options...
0 Cool4 Posted February 8, 2004 Author Share Posted February 8, 2004 then how can i access it? doing things like .show.... Link to comment https://www.neowin.net/forum/topic/139478-vbnet-array-of-forms/#findComment-1708162 Share on other sites More sharing options...
0 Cool4 Posted February 8, 2004 Author Share Posted February 8, 2004 i still can't work with the forms on the array :blush: btw, i have a web control and when i open it in a normal window it works fine, but when i open it in a mdi form inside the main form it just reads the web page title and stops! what's the problem with this?? i'm clueless... and i also need to know how to send commands from the main form to the active mdi form, like mdiform.webcontrol1.navigate(me.combobox1.text) thnx :ninja: Link to comment https://www.neowin.net/forum/topic/139478-vbnet-array-of-forms/#findComment-1708356 Share on other sites More sharing options...
0 bangbang023 Veteran Posted February 8, 2004 Veteran Share Posted February 8, 2004 to access the form you would do noteform(i).show the rest I can not help you on sorry. Link to comment https://www.neowin.net/forum/topic/139478-vbnet-array-of-forms/#findComment-1708389 Share on other sites More sharing options...
0 Cool4 Posted February 8, 2004 Author Share Posted February 8, 2004 believe me.. i've tried that... but when i do 'noteform(i).' it just displays 'gettype' btw, formNote1 is the name of the form that we are creating, isn't it? Link to comment https://www.neowin.net/forum/topic/139478-vbnet-array-of-forms/#findComment-1708406 Share on other sites More sharing options...
0 bangbang023 Veteran Posted February 8, 2004 Veteran Share Posted February 8, 2004 Cool4 said: believe me.. i've tried that... but when i do 'noteform(i).' it just displays 'gettype'btw, formNote1 is the name of the form that we are creating, isn't it? 1) even though you only see "gettype" using any of the commands like "show" will work 2) formNote1 is a form I created and is visible in my project file listing. I am simply copying it multiple times. Link to comment https://www.neowin.net/forum/topic/139478-vbnet-array-of-forms/#findComment-1708552 Share on other sites More sharing options...
0 Cool4 Posted February 8, 2004 Author Share Posted February 8, 2004 ok.. i got it to work finaly... thans alot for your patience... ;) but i still have that problem when opening web pages in mdi forms... the web control just freeze, i tried to find some nice free webcontrol to see if i could solve that problem... but nothing! :( pls i really need some help Link to comment https://www.neowin.net/forum/topic/139478-vbnet-array-of-forms/#findComment-1708641 Share on other sites More sharing options...
Question
Cool4
how to create a array of forms?
i tried:
but it gives me a error "Object reference not set to an instance of an object."
can someone help, please?
Link to comment
https://www.neowin.net/forum/topic/139478-vbnet-array-of-forms/Share on other sites
9 answers to this question
Recommended Posts