Solved

How to FREE resources (system resources) when loading & unloading instances of the same form?

Posted on 2000-02-21
8
231 Views
Last Modified: 2010-04-16
Hi!

I am loading & unloading instances of the same form, but when I unload one of the form's instances (with "unload form1(x)" ...) nothing happends.

I searched through the MSDN and found some proposed answers (freeing resources) but that does NOT work.

Do you have an answer?


here is how I create those forms:

in module:
dim xxxx as form1

in code:

redim xxxx (1 to 200) as form1

then I show and close those forms.

THANX!

Igor.
0
Comment
Question by:kojot
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
8 Comments
 
LVL 14

Expert Comment

by:mcrider
ID: 2545254
Try this:

In a MODULE:

     Global xxxx() As Form1

In Code:

     Redim xxxx(1 to 200) As Form1

Then to show the first form:

     Set xxxx(1) = New Form1
     xxxx(1).Show
     
To unload the first form:

     Unload xxxx(1)
     Set xxxx(1) = Nothing



Cheers!
0
 

Author Comment

by:kojot
ID: 2545677
I've allready tried that and it doesn't work. Resources just get lower and lower when I load a form I've unloaded before.

Thank you for your answer, but it doesn't work.


Igor.
0
 
LVL 14

Expert Comment

by:mcrider
ID: 2546293
You tried the "Set xxxx(1) = Nothing"???

It works PERFECTLY on my system...
0
[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

 

Author Comment

by:kojot
ID: 2549170
Yes .. but nothing happend .. damn:) If you'd like I can send you my project and you can see for yourselve.

mail me at: maverick@maverick-int.si

Igor.
0
 
LVL 14

Accepted Solution

by:
mcrider earned 100 total points
ID: 2549330
That email address doesn't work...
0
 

Author Comment

by:kojot
ID: 2549523
What? OK .. maybe there are problems with servers .. put your email adress here and I'll send you  the code.

Igor.
0
 

Author Comment

by:kojot
ID: 2550000
Ok .. my fault .. an OCX was still active while i was trying to close the form. That worx. 10x!
0
 
LVL 14

Expert Comment

by:mcrider
ID: 2552309
Thanks for the points. Glad I could help!


Cheers!
0

Featured Post

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
This is about my first experience with programming Arduino.
Six Sigma Control Plans
Starting up a Project

622 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question