1.
ÔÚ³ÌÐòÖÐ×¢²áºÍ×¢Ïú OCX ¿Ø¼þ 98-7-20
ÉùÃ÷£¨ÔÚ±¾Àý×ÓÀïʹÓõÄÊÇ ComCtl32.OCX£¬Èç¹ûÊÇÆäËû£¬Ê¹ÓÃÏàÓ¦µÄÃû³Æ£©£º
Declare Function RegComCtl32 Lib "ComCtl32.OCX" _
Alias "DllRegisterServer" () As Long
Declare Function UnRegComCtl32 Lib "ComCtl32.OCX" _
Alias "DllUnregisterServer" () As Long
Const ERROR_SUCCESS = &H0
ʹÓãº
If RegComCtl32 = ERROR_SUCCESS Then
MsgBox "Registration Successful"
Else
MsgBox "Registration Unsuccessful"
End If
If UnRegComCtl32 = ERROR_SUCCESS Then
MsgBox "UnRegistration Successful"
Else
MsgBox "UnRegistration Unsuccessful"
End If
2.
½¨Á¢¿ÉÏÂÀÑ¡ÔñµÄÊôÐÔ
ÀýÈçÔÚ BorderStyle ÖÐÓÐÒÔϵÄËĸöÑ¡Ôñ£º
0 - None
1 - Dashed
2 - Single Line
3 - Double Line
4 - 3D
Ê×ÏÈÔڿؼþÖж¨ÒåÒÔϵļ¯ºÏ£º
Enum BorderType
None
Dashed
[Single Line]
[Double Line]
[3D]
End Enum
È»ºó¾Í¿ÉÒÔ°ÑÊôÐÔµÄÀàÐÍÉèÖúãº
Public Property Get BorderStyle() As BorderType
Border = m_BorderStyle
End Property
Public Property Let BorderStyle(ByVal New_BorderStyle As BorderType)
m_BorderStyle = New_BorderStyle
PropertyChanged "BorderStyle"
End Property
3.
ȱʡֵºÍ¿ÉÑ¡²ÎÊý
VB5 ¼ÓÇ¿Á˺¯Êý²ÎÊý·½Ã棬¿ÉÓÃÒÔϵĴúÂëʵÏÖ²ÎÊýȱʡ£º
Property Get Value(Optional index As Long = 1)
...
End Property
Ò²¿ÉʹÓÃÁíÒ»¸ö·½·¨£¨Âý£©£º
Property Get Value(Optional index As Long)
If IsMissing(index) Then index = 1
...
End Property