PDA

Click to See Complete Forum and Search --> : Yes, another resizing question


BJ
Nov 13th, 1999, 04:12 AM
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

MartinLiss
Nov 13th, 1999, 06:48 AM
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
ErrorRoutine:

Select Case Err.Number
Case 99
Resume Next
End Select

substituting whatever error number you are getting for the 99.

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

BJ
Nov 13th, 1999, 11:28 AM
Thanks Again!

BJ