Dears,
I have created an ActiveX control. I placed a picture box and a lable in it with the following code
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 helpCode: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




Reply With Quote