em vừa tạo xong một Ocx nhưng không biết tạo ra các thuộc tính cho người sử dụng có thể tùy chọn (VD: cho phép thay đổi màu chữ...) mong các bác chỉ giúp.
em vừa tạo xong một Ocx nhưng không biết tạo ra các thuộc tính cho người sử dụng có thể tùy chọn (VD: cho phép thay đổi màu chữ...) mong các bác chỉ giúp.
Dim mColor As OLE_COLOR
Public Property Get font_color() As Variant
font_color = mColor
End Property
Public Property Let font_color(ByVal vNewColor As OLE_COLOR)
mColor = vNewColor
UserControl.ForeColor = mColor
PropertyChanged "font_color"
End Property
Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
mColor = PropBag.ReadProperty("font_color", &H80000012)
End Sub
Private Sub UserControl_WriteProperties(PropBag As PropertyBag)
Set mColor = PropBag.WriteProperty("font_color", mColor, &H80000012)
End Sub
Bookmarks