dim forms(x to y) as form 
Author Message
 dim forms(x to y) as form

When I use this line:
Dim MoreForms(1 to 10) as new frmHelp
but I decide not to use any of them (Don't access any of it's properties or
load/show it), will this use any memory or is it better to redim them
whenever I need any of them?

--
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
remove REPLYTO from my e-mail address to reply.
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*



Wed, 11 Jul 2001 03:00:00 GMT  
 dim forms(x to y) as form



Quote:
>When I use this line:
>Dim MoreForms(1 to 10) as new frmHelp
>but I decide not to use any of them (Don't access any of it's properties or
>load/show it), will this use any memory or is it better to redim them
>whenever I need any of them?

>--
>*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
>remove REPLYTO from my e-mail address to reply.
>*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

Yes this will use memory.
You are creating an array which contains 10 forms.
Not good if your not going to use half the forms since you'll be wasting
memory.

Better off Rediming when you need to add another form.



Wed, 11 Jul 2001 03:00:00 GMT  
 dim forms(x to y) as form
Get rid of the New keyword!

Use Set As new ... if you need the form.



Quote:
>When I use this line:
>Dim MoreForms(1 to 10) as new frmHelp
>but I decide not to use any of them (Don't access any of it's properties or
>load/show it), will this use any memory or is it better to redim them
>whenever I need any of them?

>--
>*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
>remove REPLYTO from my e-mail address to reply.
>*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*



Wed, 11 Jul 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. dim string to dim form

2. DIM a control on a form...

3. Closing form / ending application problems (with Dim WithEvents object)

4. Re Dim an array for entire form

5. VB40: Dim of Forms/Display Weirdness

6. HELP WITH removing item from a 2 dim array within ASP Form

7. referencing a control on a form opened by dim x as new formname x.show

8. Unloading a 'Dim'ed Form

9. custom form control: Cannot view design view of forms that inherit this form

10. Open form, close form, open form = disposed object exception

11. load another form form one form

12. Q: Form activate Fires On Non Child MDI Forms But Only Once On Child Mdi Forms

 

 
Powered by phpBB® Forum Software