Solved

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

Posted on 2000-02-21
8
227 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
  • 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
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

A short article about problems I had with the new location API and permissions in Marshmallow
This is about my first experience with programming Arduino.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

829 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