Solved

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

Posted on 2000-02-21
8
222 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
Comment Utility
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
Comment Utility
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
Comment Utility
You tried the "Set xxxx(1) = Nothing"???

It works PERFECTLY on my system...
0
 

Author Comment

by:kojot
Comment Utility
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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 14

Accepted Solution

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

Author Comment

by:kojot
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks for the points. Glad I could help!


Cheers!
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

763 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now