|
-
January 14th, 2010, 01:31 AM
#1
unloading an indexed frame
Hello I have a main form with a protoype frame (index 0) with a few indexed buttons in it...I load in addition frames as needed:
Code:
If intFrameCount <> 0 Then Load FrameProto(intFrameCount)
With FrameProto(intFrameCount)
.Caption = strParsedstr(0)
.Left = strParsedstr(2)
etc
Now later on I want to kill off all of these loaded frames (basically so I can reload them with some slight updates--possibly a different number of radio buttons)...I don't need to kill frameProto(0), since it is there at design time.
but when I try to unload, say frame 1 (Unload FrameProto(1) ), I get error 365 unable to unload within this context....I tried doing it by a timer method , but same problem.
any ideas?
-
January 14th, 2010, 10:32 AM
#2
Re: unloading an indexed frame
I'm betting you first need to unload the controls it contains first...
Good Luck
-
January 14th, 2010, 02:08 PM
#3
Re: unloading an indexed frame
Bet won.
You can unload all controls on a frame (provided they are indexed, too) like:
Code:
Dim c As Control
For Each c in Me.Controls
If c.Container Is Frame(n) Then Unload c
Next
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|