Toolbar looks ourselves (3)

xiaoxiao2021-03-05  19

'Various attributes and methods in the class, mainly for external calls Friend Property Let BorderColor (ByVal vData As Long) If m_lngBrdColor <> vData Then m_lngBrdColor = vData If m_lngBrdStyle> 3 Then Refresh End IfEnd PropertyFriend Property Get BorderColor () As Long BorderColor = m_lngBrdColorEnd PropertyFriend Property Let BackPicture (ByVal vData As String) If vData <> "" And Dir (vData) <> "" Then If LCase (m_strBkPicture) <> LCase (vData) Then m_strBkPicture = vData Set mpicBk = LoadPicture (m_strBkPicture ) Refresh End If Else Set mpicBk = Nothing m_strBkPicture = "" End IfEnd PropertyFriend Property Get BackPicture () As String BackPicture = m_strBkPictureEnd PropertyFriend Property Let FontName (ByVal vData As String) Dim s As String, i As Long vData = Trim (vData) S = STRCONV (Font.Lffacename, Vbunicode) i = I = INSTR (1, S, CHR (0)) IF i> 0 THEN S = Left $ (S, I - 1) Endiffy IF S <> VData Then CopyMemory Font. LF Facename (0), byval vdata, LSTRLEN (VDATA) Refresh Endness PropertyFriend Property Get FontName () AS STRING DIM S AS STRING, I as long s = strconv (font.lffacename, vbunicode) i = I = INSTR (1, s, chr (0) - 1) IF i> 0 THEN FONTNAME = LEFT $ (S, I - 1) Else FontName = S end ifend property

Friend Property Let FontUnderline (ByVal vData As Boolean) Dim i As Long i = IIf (vData, 1, 0) If Font.lfUnderline <> i Then Font.lfUnderline = i Refresh End IfEnd PropertyFriend Property Get FontUnderline () As Boolean FontUnderline = (Font.lfUnderline = 1) End PropertyFriend Property Let FontItalic (ByVal vData As Boolean) Dim i As Long i = IIf (vData, 1, 0) If Font.lfItalic <> i Then Font.lfItalic = i Refresh End IfEnd PropertyFriend Property Get fontital () as boolean fontital = (font.lfitalic = 1) End PropertyFriend Property Let Fontbold (Byval VData As Boolean) DIM I as Long i = IIF (VDATA, 700, 400) IF Font.LFweight <> I then font. lfWeight = i Refresh End IfEnd PropertyFriend Property Get FontBold () As Boolean FontBold = (Font.lfWeight = 700) End PropertyFriend Property Let FontSize (ByVal vData As Long) If Font.lfHeight <> vData And vData> = 7 And vData <= 16 Ten Font.Lfheight = VDATA Font.lfWidth = 0 Refresh End IfEnd PropertyFriend Property Get FontSize () As Long FontSize = Font.lfHeightEnd PropertyFriend Property Let BorderStyle (ByVal vData As Long) If m_lngBrdStyle <> vData Then m_lngBrdStyle = vData Refresh End IfEnd PropertyFriend Property Get BorderStyle () As Long BorderStyle = m_lngBrdStyleEnd PropertyFriend Property Let TextHiColor (ByVal vData As Long) m_lngTextHiColor = vDataEnd PropertyFriend Property Get TextHiColor () As Long TextHiColor = m_lngTextHiColorEnd PropertyFriend Property Let TextColor (ByVal vData As Long) If m_lngTextColor <>

转载请注明原文地址:https://www.9cbs.com/read-36752.html

New Post(0)