Results 1 to 3 of 3

Thread: [RESOLVED] ActiveX Label Caption issue in Runtime

Threaded View

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    May 2004
    Location
    Quetta-Pakistan
    Posts
    852

    Resolved [RESOLVED] ActiveX Label Caption issue in Runtime

    Dears,

    I have created an ActiveX control. I placed a picture box and a lable in it with the following code
    Code:
    Event resizeMe()
    
    
    Private Sub UserControl_Resize()
        On Error Resume Next
    
        P1.Move 0, 0, UserControl.Width - 10, UserControl.Height - 10
        L1.Move 0, (UserControl.Height / 2) - (L1.Height / 2), UserControl.Width, 255
        RaiseEvent resizeMe
    
    End Sub
    
    
    'declare object properties
    Public Property Get Caption() As String
        Caption = L1.Caption  'return button caption
    End Property
    
    Public Property Let Caption(ByVal newCap As String)
        L1.Caption = newCap 'set button caption
    End Property
    
    Public Property Get BackColor() As OLE_COLOR
        BackColor = UserControl.BackColor 'return bgcolor
        BackColor = L1.BackColor
    End Property
    
    Public Property Let BackColor(ByVal newBack As OLE_COLOR)
        UserControl.BackColor() = newBack 'set bgcolor
        L1.BackColor() = newBack
    End Property
    I placed that ActiveX control on form and set it caption. But when run the project, it caption changed to none (mean no caption)... please help
    Last edited by hafizfarooq; Feb 8th, 2010 at 05:42 AM.

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