|
|
|
| Hi All,
Is there a way i can know the form instances loaded currently in the memory.
and i can unload a few of them(say 2 out 3 forms) when i press a button or do
some action.
Thanks
| |
| Harvey Triana 2006-01-26, 6:56 pm |
| You can know the form instances loaded in memory with Forms collection.
---
<Harvey Triana />
Drilling View© Developer (52 oil wells in 2005)
---------------------
I signed the petition at:
http://classicvb.org/petition/index.asp
"abs81" <abs81@discussions.microsoft.com> escribió en el mensaje
news:468BDB6D-BA45-4C6D-8EC5-3A98DEA311EB@microsoft.com...
> Hi All,
> Is there a way i can know the form instances loaded currently in the
> memory.
> and i can unload a few of them(say 2 out 3 forms) when i press a button or
> do
> some action.
>
> Thanks
| |
| David J Mark 2006-01-26, 6:56 pm |
|
"abs81" <abs81@discussions.microsoft.com> wrote in message
news:468BDB6D-BA45-4C6D-8EC5-3A98DEA311EB@microsoft.com...
> Hi All,
> Is there a way i can know the form instances loaded currently in the
> memory.
As mentioned, the forms collection.
> and i can unload a few of them(say 2 out 3 forms) when i press a button or
> do
> some action.
You can unload as many as you want, whenever you want.
>
> Thanks
| |
| Larry Serflaten 2006-01-26, 6:56 pm |
|
"David J Mark" <nntp45534-22@newsdesk.net> wrote
> You can unload as many as you want, whenever you want.
No you can't. Read up on Error 365.
LFS
| |
| Randy Birch 2006-01-26, 6:56 pm |
| .... and just so you know, DoEvents, when used as a Function, returns the
number of visible forms:
numFormsVisible = DoEvents
--
Randy Birch
MS MVP Visual Basic
http://vbnet.mvps.org/
Please reply to the newsgroups so all can participate.
"abs81" <abs81@discussions.microsoft.com> wrote in message
news:468BDB6D-BA45-4C6D-8EC5-3A98DEA311EB@microsoft.com...
: Hi All,
: Is there a way i can know the form instances loaded currently in the
memory.
: and i can unload a few of them(say 2 out 3 forms) when i press a button or
do
: some action.
:
: Thanks
| |
| Karl E. Peterson 2006-01-26, 9:55 pm |
| Randy Birch wrote:
> ... and just so you know, DoEvents, when used as a Function, returns
> the number of visible forms:
>
> numFormsVisible = DoEvents
But only in ClassicVB! <tm> ;-)
--
Working without a .NET?
http://classicvb.org/
| |
| Rick Rothstein [MVP - Visual Basic] 2006-01-27, 3:55 am |
| > > ... and just so you know, DoEvents, when used as a Function, returns
>
> But only in ClassicVB! <tm> ;-)
What other VB is there that we should care about? <bg>
Rick
| |
| Bob O`Bob 2006-01-27, 3:55 am |
| Randy Birch wrote:
> ... and just so you know, DoEvents, when used as a Function, returns the
> number of visible forms:
>
> numFormsVisible = DoEvents
>
Fairly highly placed on my list of "fun and interesting quirks of VB."
I've used that one more often to "obfuscate" my code than for any more practical reasons:
while doevents
unload forms(0)
wend
Bob
--
| |
| Chris Kusmierz 2006-01-27, 6:56 pm |
|
"Bob O`Bob" <filterMUNGEbob@yahoogroups.com> wrote in message news:eN$6a%>
I've used that one more often to "obfuscate" my code than for any more
practical reasons:
>
> while doevents
> unload forms(0)
> wend
>
>
>
> Bob
> --
LOL!
| |
| Karl E. Peterson 2006-01-27, 6:56 pm |
| Rick Rothstein [MVP - Visual Basic] wrote:
>
> What other VB is there that we should care about? <bg>
None that I'm aware of! (But I always caught grief on the VFred bullets for
this point. Hardly anyone knew that DoEvents returns a value.)
--
Working without a .NET?
http://classicvb.org/
| |
| Jeff Johnson [MVP: VB] 2006-01-27, 6:56 pm |
|
"Bob O`Bob" <filterbob@yahoogroups.com> wrote in message
news:eN$6a%23vIGHA.1124@TK2MSFTNGP10.phx.gbl...
> Fairly highly placed on my list of "fun and interesting quirks of VB."
>
> I've used that one more often to "obfuscate" my code than for any more
> practical reasons:
>
> while doevents
> unload forms(0)
> wend
While/Wend is obfuscation enough for me....
| |
| Rick Rothstein [MVP - Visual Basic] 2006-01-27, 6:56 pm |
| > Hardly anyone knew that DoEvents returns a value.
I don't know why that would be... it **is** listed in the documentation as a
**function** (functions return values); and I just checked to be sure... the
value it returns is documented in the 1st sentence of the Remarks section.
Rick
| |
| Rick Rothstein [MVP - Visual Basic] 2006-01-27, 6:56 pm |
| > > Fairly highly placed on my list of "fun and interesting quirks of VB."
>
> While/Wend is obfuscation enough for me....
LOL
Rick
| |
| Karl E. Peterson 2006-01-27, 6:56 pm |
| Rick Rothstein [MVP - Visual Basic] wrote:
>
> I don't know why that would be... it **is** listed in the
> documentation as a **function** (functions return values); and I just
> checked to be sure... the value it returns is documented in the 1st
> sentence of the Remarks section.
Well, y'know, Microsoft has already admitted that users of .NET can't be
bothered to RTFM, hence the redefinition of Integer/Long. <shrug>
--
Working without a .NET?
http://classicvb.org/
|
|
|
|