| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 2273 人关注过本帖, 2 人收藏
标题:LED数码管显示时间的OCX,需要的拿走!源码贴上!
只看楼主 加入收藏
suzhanpeng
Rank: 4
等 级:业余侠客
威 望:7
帖 子:72
专家分:248
注 册:2016-9-28
结帖率:75%
收藏(2)
 问题点数:0 回复次数:14 
LED数码管显示时间的OCX,需要的拿走!源码贴上!
图片附件: 游客没有浏览图片的权限,请 登录注册
LED控件.zip (12.39 KB)

程序代码:
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编辑过]

收到的鲜花
搜索更多相关主题的帖子: Single Dim Long End If 
2022-09-17 15:37
chenyucheng
Rank: 3Rank: 3
来 自:浙江省台州市临海市
等 级:论坛游侠
威 望:3
帖 子:141
专家分:181
注 册:2022-7-1
收藏
得分:0 
有源码吗?

爱玩编程的小学生,有Python,但只会一点点C++。

版主->斑竹->竹子,所以版主是竹子。(doge)
//不要让我当版主
2022-09-17 17:11
yuma
Rank: 12Rank: 12Rank: 12
来 自:银河系
等 级:贵宾
威 望:37
帖 子:1934
专家分:3012
注 册:2009-12-22
收藏
得分:0 
可以改为红色不。

心生万象,万象皆程序!
本人计算机知识网:http://bbs.为防伸手党,本站已停止会员注册。
2022-09-17 20:17
suzhanpeng
Rank: 4
等 级:业余侠客
威 望:7
帖 子:72
专家分:248
注 册:2016-9-28
收藏
得分:0 
回复 3楼 yuma
字体颜色,背景色,阴影色都做到属性里了,可以自由更改。
2022-09-18 07:38
suzhanpeng
Rank: 4
等 级:业余侠客
威 望:7
帖 子:72
专家分:248
注 册:2016-9-28
收藏
得分:0 
回复 2楼 chenyucheng
源码就是画填充多边形。
2022-09-18 07:39
约定的童话
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
等 级:版主
威 望:56
帖 子:246
专家分:1442
注 册:2021-8-1
收藏
得分:0 
回复 5楼 suzhanpeng
源码一起分享有助于理解
2022-09-18 10:37
yuma
Rank: 12Rank: 12Rank: 12
来 自:银河系
等 级:贵宾
威 望:37
帖 子:1934
专家分:3012
注 册:2009-12-22
收藏
得分:0 
楼主分享一下源码吧。

心生万象,万象皆程序!
本人计算机知识网:http://bbs.为防伸手党,本站已停止会员注册。
2022-09-18 20:46
apull
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
来 自:三体星系
等 级:版主
威 望:216
帖 子:1506
专家分:9241
注 册:2010-3-16
收藏
得分:0 
2022-09-18 21:48
独木星空
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
来 自:河北省曲阳县
等 级:版主
威 望:71
帖 子:935
专家分:683
注 册:2016-6-29
收藏
得分:0 
回复 楼主 suzhanpeng
收入囊中,慢慢享用。智慧与网龄不成比例。

素数问题的解决是我学习编程永恒的动力。
2022-09-19 07:21
suzhanpeng
Rank: 4
等 级:业余侠客
威 望:7
帖 子:72
专家分:248
注 册:2016-9-28
收藏
得分:0 
回复 6楼 约定的童话
给优化一下,运行时偶尔会闪烁一下。
2022-09-19 08:06
快速回复:LED数码管显示时间的OCX,需要的拿走!源码贴上!
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.043615 second(s), 10 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved