注册 登录
编程论坛 VB6论坛

LED数码管显示时间的OCX,需要的拿走!源码贴上!

suzhanpeng 发布于 2022-09-17 15:37, 2772 次点击
只有本站会员才能查看附件,请 登录
只有本站会员才能查看附件,请 登录

程序代码:
Private Type POINTAPI
x As Long
y As Long
End Type
Private Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type

Private Declare Function CreatePolygonRgn Lib "gdi32" (lpPoint As POINTAPI, ByVal nCount As Long, ByVal nPolyFillMode As Long) As Long
Private Declare Function FillRgn Lib "gdi32" (ByVal hdc As Long, ByVal hRgn As Long, ByVal hBrush As Long) As Long
Private Declare Function PtInRegion Lib "gdi32" (ByVal hRgn As Long, ByVal x As Long, ByVal y As Long) As Long
Private Declare Function CreateSolidBrush Lib "gdi32" (ByVal crColor As Long) As Long
Private Declare Function SelectObject Lib "gdi32" (ByVal hdc As Long, ByVal hObject As Long) As Long
Private Declare Function GetLastError Lib "kernel32" () As Long
Private Declare Function DeleteObject Lib "gdi32" (ByVal hObject As Long) As Long
Const ALTERNATE = 1
Const WINDING = 2

Dim hRgn As Long
Dim LEDCaption As String


Private Sub Timer1_Timer()
Dim a As String
Dim i As Integer
Dim x As Single
Dim y As Single
Dim v As Single
Dim z As Single
Dim k As Integer
Dim j As Integer
Dim l As Single
a = Time
For j = 1 To Len(a)
    If Mid(LTrim(a), j, 1) = ":" Then
        k = k + 1
    End If
Next j
Picture1.Refresh
l = 50
z = 130
v = Picture1.Height / 240
x = Picture1.Width / v - (Len(a) - k) * z - k * l
y = 15
For i = 1 To Len(a)
    NumuberLED x, y, v / 15, Mid(LTrim(a), i, 1)
    If Mid(LTrim(a), i, 1) = ":" Then
        x = x + l
    Else
        x = x + z
    End If
Next i
End Sub

Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
On Error Resume Next
BackColor = PropBag.ReadProperty("BackColor", Picture1.BackColor)
FillColor = PropBag.ReadProperty("FillColor", Picture1.FillColor)
ForeColor = PropBag.ReadProperty("ForeColor", Picture1.ForeColor)
End Sub
Private Sub UserControl_WriteProperties(PropBag As PropertyBag)
Call PropBag.WriteProperty("BackColor", Picture1.BackColor)
Call PropBag.WriteProperty("FillColor", Picture1.FillColor)
Call PropBag.WriteProperty("ForeColor", Picture1.ForeColor)
End Sub


Public Property Get BackColor() As OLE_COLOR
BackColor = Picture1.BackColor
End Property
Public Property Let BackColor(ByVal newBackColor As OLE_COLOR)
Picture1.BackColor = newBackColor
PropertyChanged "BackColor"
End Property
Public Property Get FillColor() As OLE_COLOR
FillColor = Picture1.FillColor
End Property
Public Property Let FillColor(ByVal newFillColor As OLE_COLOR)
Picture1.FillColor = newFillColor
PropertyChanged "FillColor"
End Property

Public Property Get ForeColor() As OLE_COLOR
ForeColor = Picture1.ForeColor
End Property
Public Property Let ForeColor(ByVal newForeColor As OLE_COLOR)
Picture1.ForeColor = newForeColor
PropertyChanged "ForeColor"
End Property



Sub NumuberLED(Topx As Single, Topy As Single, Bili As Single, Numuber As String)
        Select Case Numuber
            Case "0"
                LED1 Topx, Topy, Bili
                LED2 Topx, Topy, Bili
                LED6 Topx, Topy, Bili
'                LED7 Topx, Topy, Bili
                LED5 Topx, Topy, Bili
                LED3 Topx, Topy, Bili
                LED4 Topx, Topy, Bili
            Case "1"
                'LED1 Topx, Topy, Bili
                LED2 Topx, Topy, Bili
'                LED6 Topx, Topy, Bili
                'LED7 Topx, Topy, Bili
                'LED5 Topx, Topy, Bili
                LED3 Topx, Topy, Bili
                'LED4 Topx, Topy, Bili
            Case "2"
                LED1 Topx, Topy, Bili
                LED2 Topx, Topy, Bili
                'LED6 Topx, Topy, Bili
               LED7 Topx, Topy, Bili
                LED5 Topx, Topy, Bili
                'LED3 Topx, Topy, Bili
                LED4 Topx, Topy, Bili
            Case "3"
                LED1 Topx, Topy, Bili
                LED2 Topx, Topy, Bili
'                LED6 Topx, Topy, Bili
                LED7 Topx, Topy, Bili
                'LED5 Topx, Topy, Bili
                LED3 Topx, Topy, Bili
                LED4 Topx, Topy, Bili
            Case "4"
                'LED1 Topx, Topy, Bili
               LED2 Topx, Topy, Bili
               LED6 Topx, Topy, Bili
                LED7 Topx, Topy, Bili
'                LED5 Topx, Topy, Bili
                LED3 Topx, Topy, Bili
'                LED4 Topx, Topy, Bili
            Case "5"
                LED1 Topx, Topy, Bili
                'LED2 Topx, Topy, Bili
                LED6 Topx, Topy, Bili
                LED7 Topx, Topy, Bili
                'LED5 Topx, Topy, Bili
                LED3 Topx, Topy, Bili
                LED4 Topx, Topy, Bili
            Case "6"
                LED1 Topx, Topy, Bili
                'LED2 Topx, Topy, Bili
               LED6 Topx, Topy, Bili
                LED7 Topx, Topy, Bili
                LED5 Topx, Topy, Bili
                LED3 Topx, Topy, Bili
                LED4 Topx, Topy, Bili
            Case "7"
               LED1 Topx, Topy, Bili
                LED2 Topx, Topy, Bili
'               LED6 Topx, Topy, Bili
                'LED7 Topx, Topy, Bili
                'LED5 Topx, Topy, Bili
                LED3 Topx, Topy, Bili
                'LED4 Topx, Topy, Bili
            Case "8"
               LED1 Topx, Topy, Bili
                LED2 Topx, Topy, Bili
                LED6 Topx, Topy, Bili
                LED7 Topx, Topy, Bili
                LED5 Topx, Topy, Bili
                LED3 Topx, Topy, Bili
               LED4 Topx, Topy, Bili
            Case "9"
               LED1 Topx, Topy, Bili
               LED2 Topx, Topy, Bili
                LED6 Topx, Topy, Bili
                LED7 Topx, Topy, Bili
                'LED5 Topx, Topy, Bili
                LED3 Topx, Topy, Bili
                LED4 Topx, Topy, Bili
            Case "."

                LED8 Topx, Topy, Bili
               
            Case ":"

                LED9 Topx, Topy, Bili
            Case Else
                'LED1 Topx, Topy, Bili
                LED2 Topx, Topy, Bili
                LED3 Topx, Topy, Bili
                'LED4 Topx, Topy, Bili
                LED5 Topx, Topy, Bili
               LED6 Topx, Topy, Bili
               LED7 Topx, Topy, Bili

        End Select


    End Sub
Sub LED1(m As Single, n As Single, p As Single)

Dim xxx(5) As POINTAPI
Dim lB As Long
xxx(0).x = (13 + m + 20) * p: xxx(0).y = (10 + n + 20) * p
xxx(1).x = (23 + m + 20) * p: xxx(1).y = (0 + n + 20) * p
xxx(2).x = (77 + m + 20) * p: xxx(2).y = (0 + n + 20) * p
xxx(3).x = (87 + m + 20) * p: xxx(3).y = (10 + n + 20) * p
xxx(4).x = (77 + m + 20) * p: xxx(4).y = (20 + n + 20) * p
xxx(5).x = (23 + m + 20) * p: xxx(5).y = (20 + n + 20) * p
hRgn = CreatePolygonRgn(xxx(0), 6, ALTERNATE)
If hRgn <> 0 Then
       lB = CreateSolidBrush(Picture1.ForeColor)
       Debug.Print FillRgn(Picture1.hdc, hRgn, lB)
End If
DeleteObject hRgn
DeleteObject lB
Dim xx(5) As POINTAPI
xx(0).x = (13 + m) * p: xx(0).y = (10 + n) * p
xx(1).x = (23 + m) * p: xx(1).y = (0 + n) * p
xx(2).x = (77 + m) * p: xx(2).y = (0 + n) * p
xx(3).x = (87 + m) * p: xx(3).y = (10 + n) * p
xx(4).x = (77 + m) * p: xx(4).y = (20 + n) * p
xx(5).x = (23 + m) * p: xx(5).y = (20 + n) * p
hRgn = CreatePolygonRgn(xx(0), 6, ALTERNATE)
If hRgn <> 0 Then
    lB = CreateSolidBrush(Picture1.FillColor)
       Debug.Print FillRgn(Picture1.hdc, hRgn, lB)
End If
DeleteObject hRgn
DeleteObject lB
End Sub
Sub LED2(m As Single, n As Single, p As Single)
Dim xxx(5) As POINTAPI
Dim lB As Long
xxx(0).x = (90 + m + 20) * p: xxx(0).y = (13 + n + 20) * p
xxx(1).x = (100 + m + 20) * p: xxx(1).y = (23 + n + 20) * p
xxx(2).x = (100 + m + 20) * p: xxx(2).y = (87 + n + 20) * p
xxx(3).x = (90 + m + 20) * p: xxx(3).y = (97 + n + 20) * p
xxx(4).x = (80 + m + 20) * p: xxx(4).y = (87 + n + 20) * p
xxx(5).x = (80 + m + 20) * p: xxx(5).y = (23 + n + 20) * p

hRgn = CreatePolygonRgn(xxx(0), 6, ALTERNATE)
If hRgn <> 0 Then
       lB = CreateSolidBrush(Picture1.ForeColor)
       Debug.Print FillRgn(Picture1.hdc, hRgn, lB)
End If
DeleteObject hRgn
DeleteObject lB

Dim xx(5) As POINTAPI
xx(0).x = (90 + m) * p: xx(0).y = (13 + n) * p
xx(1).x = (100 + m) * p: xx(1).y = (23 + n) * p
xx(2).x = (100 + m) * p: xx(2).y = (87 + n) * p
xx(3).x = (90 + m) * p: xx(3).y = (97 + n) * p
xx(4).x = (80 + m) * p: xx(4).y = (87 + n) * p
xx(5).x = (80 + m) * p: xx(5).y = (23 + n) * p

hRgn = CreatePolygonRgn(xx(0), 6, ALTERNATE)
If hRgn <> 0 Then
    lB = CreateSolidBrush(Picture1.FillColor)
       Debug.Print FillRgn(Picture1.hdc, hRgn, lB)
End If
DeleteObject hRgn
DeleteObject lB
End Sub
Sub LED3(m As Single, n As Single, p As Single)
Dim xxx(5) As POINTAPI
Dim lB As Long
xxx(0).x = (90 + m + 20) * p: xxx(0).y = (103 + n + 20) * p
xxx(1).x = (100 + m + 20) * p: xxx(1).y = (113 + n + 20) * p
xxx(2).x = (100 + m + 20) * p: xxx(2).y = (177 + n + 20) * p
xxx(3).x = (90 + m + 20) * p: xxx(3).y = (187 + n + 20) * p
xxx(4).x = (80 + m + 20) * p: xxx(4).y = (177 + n + 20) * p
xxx(5).x = (80 + m + 20) * p: xxx(5).y = (113 + n + 20) * p

hRgn = CreatePolygonRgn(xxx(0), 6, ALTERNATE)
If hRgn <> 0 Then
   lB = CreateSolidBrush(Picture1.ForeColor)

   Debug.Print FillRgn(Picture1.hdc, hRgn, lB)
End If
DeleteObject hRgn
DeleteObject lB

Dim xx(5) As POINTAPI
xx(0).x = (90 + m) * p: xx(0).y = (103 + n) * p
xx(1).x = (100 + m) * p: xx(1).y = (113 + n) * p
xx(2).x = (100 + m) * p: xx(2).y = (177 + n) * p
xx(3).x = (90 + m) * p: xx(3).y = (187 + n) * p
xx(4).x = (80 + m) * p: xx(4).y = (177 + n) * p
xx(5).x = (80 + m) * p: xx(5).y = (113 + n) * p

hRgn = CreatePolygonRgn(xx(0), 6, ALTERNATE)
If hRgn <> 0 Then
lB = CreateSolidBrush(Picture1.FillColor)

   Debug.Print FillRgn(Picture1.hdc, hRgn, lB)
End If
DeleteObject hRgn
DeleteObject lB
End Sub
Sub LED4(m As Single, n As Single, p As Single)
Dim xxx(5) As POINTAPI
Dim lB As Long
xxx(0).x = (13 + m + 20) * p: xxx(0).y = (190 + n + 20) * p
xxx(1).x = (23 + m + 20) * p: xxx(1).y = (180 + n + 20) * p
xxx(2).x = (77 + m + 20) * p: xxx(2).y = (180 + n + 20) * p
xxx(3).x = (87 + m + 20) * p: xxx(3).y = (190 + n + 20) * p
xxx(4).x = (77 + m + 20) * p: xxx(4).y = (200 + n + 20) * p
xxx(5).x = (23 + m + 20) * p: xxx(5).y = (200 + n + 20) * p

hRgn = CreatePolygonRgn(xxx(0), 6, ALTERNATE)
If hRgn <> 0 Then
   lB = CreateSolidBrush(Picture1.ForeColor)

   Debug.Print FillRgn(Picture1.hdc, hRgn, lB)
End If
DeleteObject hRgn
DeleteObject lB

Dim xx(5) As POINTAPI
xx(0).x = (13 + m) * p: xx(0).y = (190 + n) * p
xx(1).x = (23 + m) * p: xx(1).y = (180 + n) * p
xx(2).x = (77 + m) * p: xx(2).y = (180 + n) * p
xx(3).x = (87 + m) * p: xx(3).y = (190 + n) * p
xx(4).x = (77 + m) * p: xx(4).y = (200 + n) * p
xx(5).x = (23 + m) * p: xx(5).y = (200 + n) * p

hRgn = CreatePolygonRgn(xx(0), 6, ALTERNATE)
If hRgn <> 0 Then
lB = CreateSolidBrush(Picture1.FillColor)

   Debug.Print FillRgn(Picture1.hdc, hRgn, lB)
End If
DeleteObject hRgn
DeleteObject lB
End Sub
Sub LED5(m As Single, n As Single, p As Single)
Dim xxx(5) As POINTAPI
Dim lB As Long
xxx(0).x = (10 + m + 20) * p: xxx(0).y = (103 + n + 20) * p
xxx(1).x = (20 + m + 20) * p: xxx(1).y = (113 + n + 20) * p
xxx(2).x = (20 + m + 20) * p: xxx(2).y = (177 + n + 20) * p
xxx(3).x = (10 + m + 20) * p: xxx(3).y = (187 + n + 20) * p
xxx(4).x = (0 + m + 20) * p: xxx(4).y = (177 + n + 20) * p
xxx(5).x = (0 + m + 20) * p: xxx(5).y = (113 + n + 20) * p

hRgn = CreatePolygonRgn(xxx(0), 6, ALTERNATE)
If hRgn <> 0 Then
   lB = CreateSolidBrush(Picture1.ForeColor)

   Debug.Print FillRgn(Picture1.hdc, hRgn, lB)
End If
DeleteObject hRgn
DeleteObject lB

Dim xx(5) As POINTAPI

xx(0).x = (10 + m) * p: xx(0).y = (103 + n) * p
xx(1).x = (20 + m) * p: xx(1).y = (113 + n) * p
xx(2).x = (20 + m) * p: xx(2).y = (177 + n) * p
xx(3).x = (10 + m) * p: xx(3).y = (187 + n) * p
xx(4).x = (0 + m) * p: xx(4).y = (177 + n) * p
xx(5).x = (0 + m) * p: xx(5).y = (113 + n) * p

hRgn = CreatePolygonRgn(xx(0), 6, ALTERNATE)
If hRgn <> 0 Then
lB = CreateSolidBrush(Picture1.FillColor)

   Debug.Print FillRgn(Picture1.hdc, hRgn, lB)
End If
DeleteObject hRgn
DeleteObject lB
End Sub
Sub LED6(m As Single, n As Single, p As Single)
Dim xxx(5) As POINTAPI
Dim lB As Long
xxx(0).x = (10 + m + 20) * p: xxx(0).y = (13 + n + 20) * p
xxx(1).x = (20 + m + 20) * p: xxx(1).y = (23 + n + 20) * p
xxx(2).x = (20 + m + 20) * p: xxx(2).y = (87 + n + 20) * p
xxx(3).x = (10 + m + 20) * p: xxx(3).y = (97 + n + 20) * p
xxx(4).x = (0 + m + 20) * p: xxx(4).y = (87 + n + 20) * p
xxx(5).x = (0 + m + 20) * p: xxx(5).y = (23 + n + 20) * p

hRgn = CreatePolygonRgn(xxx(0), 6, ALTERNATE)
If hRgn <> 0 Then
   lB = CreateSolidBrush(Picture1.ForeColor)

   Debug.Print FillRgn(Picture1.hdc, hRgn, lB)
End If
DeleteObject hRgn
DeleteObject lB

Dim xx(5) As POINTAPI

xx(0).x = (10 + m) * p: xx(0).y = (13 + n) * p
xx(1).x = (20 + m) * p: xx(1).y = (23 + n) * p
xx(2).x = (20 + m) * p: xx(2).y = (87 + n) * p
xx(3).x = (10 + m) * p: xx(3).y = (97 + n) * p
xx(4).x = (0 + m) * p: xx(4).y = (87 + n) * p
xx(5).x = (0 + m) * p: xx(5).y = (23 + n) * p

hRgn = CreatePolygonRgn(xx(0), 6, ALTERNATE)
If hRgn <> 0 Then
lB = CreateSolidBrush(Picture1.FillColor)

   Debug.Print FillRgn(Picture1.hdc, hRgn, lB)
End If
DeleteObject hRgn
DeleteObject lB
End Sub
Sub LED7(m As Single, n As Single, p As Single)
Dim xxx(5) As POINTAPI
Dim lB As Long
xxx(0).x = (13 + m + 20) * p: xxx(0).y = (100 + n + 20) * p
xxx(1).x = (23 + m + 20) * p: xxx(1).y = (90 + n + 20) * p
xxx(2).x = (77 + m + 20) * p: xxx(2).y = (90 + n + 20) * p
xxx(3).x = (87 + m + 20) * p: xxx(3).y = (100 + n + 20) * p
xxx(4).x = (77 + m + 20) * p: xxx(4).y = (110 + n + 20) * p
xxx(5).x = (23 + m + 20) * p: xxx(5).y = (110 + n + 20) * p

hRgn = CreatePolygonRgn(xxx(0), 6, ALTERNATE)
If hRgn <> 0 Then
   lB = CreateSolidBrush(Picture1.ForeColor)

   Debug.Print FillRgn(Picture1.hdc, hRgn, lB)
End If
DeleteObject hRgn
DeleteObject lB

Dim xx(5) As POINTAPI

xx(0).x = (13 + m) * p: xx(0).y = (100 + n) * p
xx(1).x = (23 + m) * p: xx(1).y = (90 + n) * p
xx(2).x = (77 + m) * p: xx(2).y = (90 + n) * p
xx(3).x = (87 + m) * p: xx(3).y = (100 + n) * p
xx(4).x = (77 + m) * p: xx(4).y = (110 + n) * p
xx(5).x = (23 + m) * p: xx(5).y = (110 + n) * p

hRgn = CreatePolygonRgn(xx(0), 6, ALTERNATE)
If hRgn <> 0 Then
lB = CreateSolidBrush(Picture1.FillColor)

   Debug.Print FillRgn(Picture1.hdc, hRgn, lB)
End If
DeleteObject hRgn
DeleteObject lB
End Sub
Sub LED8(m As Single, n As Single, p As Single)
Dim xxx(3) As POINTAPI
Dim lB As Long
xxx(0).x = (0 + m + 20) * p: xxx(0).y = (180 + n + 20) * p
xxx(1).x = (20 + m + 20) * p: xxx(1).y = (180 + n + 20) * p
xxx(2).x = (20 + m + 20) * p: xxx(2).y = (200 + n + 20) * p
xxx(3).x = (0 + m + 20) * p: xxx(3).y = (200 + n + 20) * p

hRgn = CreatePolygonRgn(xxx(0), 4, ALTERNATE)
If hRgn <> 0 Then
   lB = CreateSolidBrush(Picture1.ForeColor)

   Debug.Print FillRgn(Picture1.hdc, hRgn, lB)
End If
DeleteObject hRgn
DeleteObject lB

Dim xx(3) As POINTAPI

xx(0).x = (0 + m) * p: xx(0).y = (180 + n) * p
xx(1).x = (20 + m) * p: xx(1).y = (180 + n) * p
xx(2).x = (20 + m) * p: xx(2).y = (200 + n) * p
xx(3).x = (0 + m) * p: xx(3).y = (200 + n) * p

hRgn = CreatePolygonRgn(xx(0), 4, ALTERNATE)
If hRgn <> 0 Then
lB = CreateSolidBrush(Picture1.FillColor)

   Debug.Print FillRgn(Picture1.hdc, hRgn, lB)
End If
DeleteObject hRgn
DeleteObject lB
End Sub

Sub LED9(m As Single, n As Single, p As Single)
Dim xxx(3) As POINTAPI
Dim lB As Long
xxx(0).x = (0 + m + 20) * p: xxx(0).y = (160 + n + 20) * p
xxx(1).x = (20 + m + 20) * p: xxx(1).y = (160 + n + 20) * p
xxx(2).x = (20 + m + 20) * p: xxx(2).y = (180 + n + 20) * p
xxx(3).x = (0 + m + 20) * p: xxx(3).y = (180 + n + 20) * p

hRgn = CreatePolygonRgn(xxx(0), 4, ALTERNATE)
If hRgn <> 0 Then
   lB = CreateSolidBrush(Picture1.ForeColor)

   Debug.Print FillRgn(Picture1.hdc, hRgn, lB)
End If
DeleteObject hRgn
DeleteObject lB

Dim xx(3) As POINTAPI
xx(0).x = (0 + m) * p: xx(0).y = (160 + n) * p
xx(1).x = (20 + m) * p: xx(1).y = (160 + n) * p
xx(2).x = (20 + m) * p: xx(2).y = (180 + n) * p
xx(3).x = (0 + m) * p: xx(3).y = (180 + n) * p

hRgn = CreatePolygonRgn(xx(0), 4, ALTERNATE)
If hRgn <> 0 Then
lB = CreateSolidBrush(Picture1.FillColor)

   Debug.Print FillRgn(Picture1.hdc, hRgn, lB)
End If
DeleteObject hRgn
DeleteObject lB

Dim xxxx(3) As POINTAPI
xxxx(0).x = (0 + m + 20) * p: xxxx(0).y = (80 + n + 20) * p
xxxx(1).x = (20 + m + 20) * p: xxxx(1).y = (80 + n + 20) * p
xxxx(2).x = (20 + m + 20) * p: xxxx(2).y = (100 + n + 20) * p
xxxx(3).x = (0 + m + 20) * p: xxxx(3).y = (100 + n + 20) * p

hRgn = CreatePolygonRgn(xxxx(0), 4, ALTERNATE)
If hRgn <> 0 Then
   lB = CreateSolidBrush(Picture1.ForeColor)

   Debug.Print FillRgn(Picture1.hdc, hRgn, lB)
End If
DeleteObject hRgn
DeleteObject lB

Dim xxxxx(3) As POINTAPI
xxxxx(0).x = (0 + m) * p: xxxxx(0).y = (80 + n) * p
xxxxx(1).x = (20 + m) * p: xxxxx(1).y = (80 + n) * p
xxxxx(2).x = (20 + m) * p: xxxxx(2).y = (100 + n) * p
xxxxx(3).x = (0 + m) * p: xxxxx(3).y = (100 + n) * p

hRgn = CreatePolygonRgn(xxxxx(0), 4, ALTERNATE)
If hRgn <> 0 Then
lB = CreateSolidBrush(Picture1.FillColor)

   Debug.Print FillRgn(Picture1.hdc, hRgn, lB)
End If
DeleteObject hRgn
DeleteObject lB
End Sub

Private Sub UserControl_Initialize()
Picture1.Top = 0
Picture1.Left = 0
Picture1.Height = UserControl.Height
Picture1.Width = UserControl.Width


End Sub

Private Sub UserControl_Resize()
Picture1.Top = 0
Picture1.Left = 0
Picture1.Height = UserControl.Height
Picture1.Width = UserControl.Width

End Sub






只有本站会员才能查看附件,请 登录
斜字体

[此贴子已经被作者于2022-9-22 15:50编辑过]

14 回复
#2
chenyucheng2022-09-17 17:11
有源码吗?
#3
yuma2022-09-17 20:17
可以改为红色不。
#4
suzhanpeng2022-09-18 07:38
回复 3楼 yuma
字体颜色,背景色,阴影色都做到属性里了,可以自由更改。
#5
suzhanpeng2022-09-18 07:39
回复 2楼 chenyucheng
源码就是画填充多边形。
#6
约定的童话2022-09-18 10:37
回复 5楼 suzhanpeng
源码一起分享有助于理解
#7
yuma2022-09-18 20:46
楼主分享一下源码吧。
#8
apull2022-09-18 21:48
#9
独木星空2022-09-19 07:21
回复 楼主 suzhanpeng
收入囊中,慢慢享用。智慧与网龄不成比例。
#10
suzhanpeng2022-09-19 08:06
回复 6楼 约定的童话
给优化一下,运行时偶尔会闪烁一下。
#11
suzhanpeng2022-09-19 08:07
回复 7楼 yuma
共同学习一下!
#12
yuma2022-09-20 14:06
楼主这代码怎么用的啊,用不了啊。
#13
suzhanpeng2022-09-21 10:38
回复 12楼 yuma
只有本站会员才能查看附件,请 登录
#14
yuma2022-09-21 18:02
只有本站会员才能查看附件,请 登录


我编译出来怎么这个样子,知道的说一下,哪里没有设置好?
#15
yuma2022-09-21 18:44
在编译好的控件上再设置属性后,好了。如下图:

只有本站会员才能查看附件,请 登录


[此贴子已经被作者于2022-9-21 18:48编辑过]

1