Results 1 to 3 of 3

Thread: Yes, another resizing question

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 1999
    Posts
    93

    Post

    Martin I took your advice and cleaned up my code. Actually what I am doing is resizing based on screen resolution. Here is the code I used from you.

    If GetScreenResolution = "800x600" Then

    Dim nIndex As Integer
    For nIndex = 0 To Recipefilefrm.Controls.Count - 1

    Recipefilefrm.Controls(nIndex).Height =(Recipefilefrm.Controls(nIndex).Height * 1.25)

    recipefilefrm.controls(nIndex).width = (recipefilefrm.controls(nIndex).width * 1.25)

    recipefilefrm.controls(nIndex).top = (recipefilefrm.controls(nIndex).top * 1.25)

    recipefilefrm.controls(nIndex).left = (recipefilefrm.controls(nIndex).left * 1.25)

    Next nIndex
    End If

    It works like a charm on any form that doesn't have a menu. But when I use it on my form with a menu, I get the message "Object doesn't support this". How can I resize everything this easy except for the menu?

    Thanks
    BJ

  2. #2
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Post

    Just add an On Error Resume Next statement, or if you are worried that other errors might occur that you want to know about, use an Error GoTo ErrorRoutine statement, and code the ErrorRoutine something like this
    Code:
    ErrorRoutine:
    
        Select Case Err.Number
            Case 99
                Resume Next
        End Select
    substituting whatever error number you are getting for the 99.

    ------------------
    Marty

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Sep 1999
    Posts
    93

    Post

    Thanks Again!

    BJ

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