Results 1 to 6 of 6

Thread: VB Control Arrays

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2000
    Location
    Grand Rapids, MI US
    Posts
    7

    Post

    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.

  2. #2
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744

    Post

    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


  3. #3

    Thread Starter
    New Member
    Join Date
    Jan 2000
    Location
    Grand Rapids, MI US
    Posts
    7

    Post

    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

  4. #4

    Thread Starter
    New Member
    Join Date
    Jan 2000
    Location
    Grand Rapids, MI US
    Posts
    7

    Post

    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

  5. #5

    Thread Starter
    New Member
    Join Date
    Jan 2000
    Location
    Grand Rapids, MI US
    Posts
    7

    Post

    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

  6. #6
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744

    Post

    Sure:


    Load frmInitial.fra(no)
    frmInitial.fra(no).Visible = True


    ------------------

    Serge

    Programmer Analyst
    sdymkov@microage.com
    Access8484@aol.com
    ICQ#: 51055819


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width