Click to See Complete Forum and Search --> : VB Control Arrays
staskied
Jan 24th, 2000, 12:07 AM
I know that will work, but what I cannot do is in one section of code load the frame and then in another section of code make the frame visible. I am looking to find out what I am doing wrong.
Serge
Jan 24th, 2000, 12:08 AM
Ohh yes you can. All you have to know is an Index of the frame you want to show.
------------------
Serge
Programmer Analyst
sdymkov@microage.com
Access8484@aol.com
ICQ#: 51055819 (http://www.icq.com/51055819)
staskied
Jan 24th, 2000, 12:13 AM
I do now the index but it still does not work.
Here is the code of the module to create and make visible and invisible frames.
Public Sub modFrame(no As Integer, action As String)
Select Case action
Case "Create"
Load frmInitial.fra(no)
Case "VisibleTrue"
frmInitial.fra(no).Visible = True
Case "VisibleFalse"
frmInitial.fra(no).Visible = False
Case "Position"
frmInitial.fra(no).Move frmInitial.ts1.ClientLeft, frmInitial.ts1.ClientTop, frmInitial.ts1.ClientWidth, frmInitial.ts1.ClientHeight
Case "Border"
frmInitial.fra(no).BorderStyle = 1
Case Else
Exit Sub
End Select
End Sub
I call the create with the following code.
Call modFrame(3, "Create")
I call the visible with this code.
Call modFrame(cnt, "VisibleTrue")
David
staskied
Jan 24th, 2000, 12:38 AM
I was able to resolve the problem. When I created the new frame it was not assigned to the correct container. I switched that and everything worked properly.
David
staskied
Jan 24th, 2000, 11:30 AM
I use the following code to add a frame to my application
Load frmInitial.fra(no)
When I am in debug it shows the frame as loaded. I am having a problem making the frame visible. If I do the visible command right after the load everything works fine, but I want to be able to make the frame become visible and invisible at will. Does anyone have any ideas?
David Staskiewicz
Serge
Jan 24th, 2000, 11:55 AM
Sure:
Load frmInitial.fra(no)
frmInitial.fra(no).Visible = True
------------------
Serge
Programmer Analyst
sdymkov@microage.com
Access8484@aol.com
ICQ#: 51055819 (http://www.icq.com/51055819)
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.