I am creating a usercontrol. It's name is VPort (I'm creating a viewport). In the UserContrl_Initialize event when I try to reference VPort.ScaleHeight...it gives me the error "Object Required". What am I doing wrong?
Here's my code:
VB Code:
Private Sub UserControl_Initialize() UserControl_Resize End Sub Private Sub UserControl_Resize() Pic1.Top = 0 Pic1.Left = 0 Pic1.Width = VPort.ScaleWidth <<<<< Object Required Error >>>>> Pic1.Height = VPort.ScaleHeight Pic2.Top = 0 Pic2.Left = 0 Pic2.Height = Pic1.ScaleHeight Pic2.Width = Pic1.ScaleWidth V1.Height = Pic1.Height V1.Top = 0 V1.Left = Pic1.Width - V1.Width H1.Top = Pic1.Height - H1.Height H1.Left = 0 H1.Width = Pic1.Width End Sub
Thanks




Reply With Quote