Results 1 to 9 of 9

Thread: [RESOLVED] Trying to set a property on a UserControl?

Threaded View

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jan 2004
    Location
    Southern California
    Posts
    5,034

    Resolved [RESOLVED] Trying to set a property on a UserControl?

    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:
    1. Private Sub UserControl_Initialize()
    2.     UserControl_Resize
    3. End Sub
    4.  
    5. Private Sub UserControl_Resize()
    6.     Pic1.Top = 0
    7.     Pic1.Left = 0
    8.     Pic1.Width = VPort.ScaleWidth   <<<<< Object Required Error >>>>>
    9.     Pic1.Height = VPort.ScaleHeight
    10.    
    11.     Pic2.Top = 0
    12.     Pic2.Left = 0
    13.     Pic2.Height = Pic1.ScaleHeight
    14.     Pic2.Width = Pic1.ScaleWidth
    15.    
    16.     V1.Height = Pic1.Height
    17.     V1.Top = 0
    18.     V1.Left = Pic1.Width - V1.Width
    19.    
    20.     H1.Top = Pic1.Height - H1.Height
    21.     H1.Left = 0
    22.     H1.Width = Pic1.Width
    23. End Sub

    Thanks
    Last edited by blakemckenna; Dec 21st, 2006 at 06:46 PM.
    Blake

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