?? module_describe.cls
字號(hào):
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
Persistable = 0 'NotPersistable
DataBindingBehavior = 0 'vbNone
DataSourceBehavior = 0 'vbNone
MTSTransactionMode = 0 'NotAnMTSObject
END
Attribute VB_Name = "module_describe"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
'模塊描繪的公共調(diào)用區(qū),為許多有模塊描繪的類提供模塊描繪的
'小的正方形方塊的顏色設(shè)置
Private Sub module_color_set(picture As PictureBox, fillcolor As Variant, forecolor As Variant)
picture.fillcolor = fillcolor
picture.forecolor = forecolor
End Sub
'設(shè)置立體感
Private Sub module_color_give(picture As PictureBox, backcolor As Variant, forecolor As Variant, right_bottom_color As Variant, x As Integer, y As Integer)
module_color_set picture, backcolor, backcolor '設(shè)置小的正方形方塊的背景色
picture.Line (y, x)-(y + 1, x + 1), , B '設(shè)置小的正方形方塊的前景色
module_color_set picture, forecolor, forecolor
picture.Line (y + 0.1, x + 0.1)-(y + 1 - 0.05, x + 1 - 0.05), , B
picture.forecolor = right_bottom_color '設(shè)置投影顏色形成立體感
picture.Line (y + 1 - 0.05, x + 1 - 0.05)-(y + 1 - 0.05, x + 0.1)
picture.Line (y + 1 - 0.04, x + 1 - 0.04)-(y + 1 - 0.05, x + 0.1 - 0.03)
picture.Line (y + 1 - 0.03, x + 1 - 0.03)-(y + 1 - 0.03, x + 0.1 - 0.05)
picture.Line (y + 1 - 0.02, x + 1 - 0.02)-(y + 1 - 0.02, x + 0.1 - 0.07)
picture.Line (y + 1 - 0.01, x + 1 - 0.01)-(y + 1 - 0.01, x + 0.1 - 0.09)
picture.Line (y + 1, x + 1)-(y + 1, x)
'設(shè)置右側(cè)線背景顏色
picture.Line (y + 0.1 - 0.01, x + 1 - 0.05)-(y + 1 - 0.05, x + 1 - 0.05)
picture.Line (y + 0.1 - 0.03, x + 1 - 0.04)-(y + 1 - 0.04, x + 1 - 0.04)
picture.Line (y + 0.1 - 0.05, x + 1 - 0.03)-(y + 1 - 0.03, x + 1 - 0.03)
picture.Line (y + 0.1 - 0.07, x + 1 - 0.02)-(y + 1 - 0.02, x + 1 - 0.02)
picture.Line (y + 0.1 - 0.09, x + 1 - 0.01)-(y + 1 - 0.01, x + 1 - 0.01)
picture.Line (y, x + 1)-(y + 1, x + 1)
'設(shè)置下部線背景顏色
End Sub
'用來(lái)描繪小的正方形方塊
Private Sub small_module_describe(picture As PictureBox, x As Integer, y As Integer, color_type As Variant)
Select Case color_type
Case 1: module_color_give picture, &HC0C0C0, &H808080, &H404040, y, x
Case 2: module_color_give picture, &HC0C0FF, &H8080FF, &HC0&, y, x
Case 3: module_color_give picture, &H80FF&, &H40C0&, &H404080, y, x
Case 4: module_color_give picture, &H80FFFF, &HC0C0&, &H808080, y, x
Case 5: module_color_give picture, &H80FF80, &HC000&, &H8000&, y, x
Case 6: module_color_give picture, &HFFFF80, &HC0C000, &H808000, y, x
Case 7: module_color_give picture, &HFF0000, &HFF0000, &H800000, y, x
Case 8: module_color_give picture, &HFF80FF, &HFF00FF, &H800080, y, x
End Select
'八種不同顏色正方形方塊
End Sub
'20種不同形狀方塊的描繪
Public Sub module_describe(picture As PictureBox, x As Integer, y As Integer, module_type As Integer, module_color_type As Integer)
Select Case module_type
Case 1:
small_module_describe picture, y, x, module_color_type
small_module_describe picture, y, x + 1, module_color_type
small_module_describe picture, y + 1, x + 1, module_color_type
small_module_describe picture, y, x + 2, module_color_type
Case 2:
small_module_describe picture, y, x, module_color_type
small_module_describe picture, y + 1, x, module_color_type
small_module_describe picture, y + 2, x, module_color_type
small_module_describe picture, y + 1, x + 1, module_color_type
Case 3:
small_module_describe picture, y, x, module_color_type
small_module_describe picture, y - 1, x + 1, module_color_type
small_module_describe picture, y, x + 1, module_color_type
small_module_describe picture, y, x + 2, module_color_type
Case 4:
small_module_describe picture, y, x, module_color_type
small_module_describe picture, y - 1, x + 1, module_color_type
small_module_describe picture, y, x + 1, module_color_type
small_module_describe picture, y + 1, x + 1, module_color_type
Case 5:
small_module_describe picture, y, x, module_color_type
small_module_describe picture, y - 1, x + 1, module_color_type
small_module_describe picture, y, x + 1, module_color_type
small_module_describe picture, y - 1, x + 2, module_color_type
Case 6:
small_module_describe picture, y, x, module_color_type
small_module_describe picture, y + 1, x, module_color_type
small_module_describe picture, y + 1, x + 1, module_color_type
small_module_describe picture, y + 2, x + 1, module_color_type
Case 7:
small_module_describe picture, y, x, module_color_type
small_module_describe picture, y, x + 1, module_color_type
small_module_describe picture, y + 1, x + 1, module_color_type
small_module_describe picture, y + 1, x + 2, module_color_type
Case 8:
small_module_describe picture, y, x, module_color_type
small_module_describe picture, y + 1, x, module_color_type
small_module_describe picture, y, x + 1, module_color_type
small_module_describe picture, y - 1, x + 1, module_color_type
Case 9:
small_module_describe picture, y, x, module_color_type
small_module_describe picture, y + 1, x, module_color_type
small_module_describe picture, y, x + 1, module_color_type
small_module_describe picture, y, x + 2, module_color_type
Case 10:
small_module_describe picture, y, x, module_color_type
small_module_describe picture, y + 1, x, module_color_type
small_module_describe picture, y + 2, x, module_color_type
small_module_describe picture, y + 2, x + 1, module_color_type
Case 11:
small_module_describe picture, y, x, module_color_type
small_module_describe picture, y, x + 1, module_color_type
small_module_describe picture, y, x + 2, module_color_type
small_module_describe picture, y - 1, x + 2, module_color_type
Case 12:
small_module_describe picture, y, x, module_color_type
small_module_describe picture, y, x + 1, module_color_type
small_module_describe picture, y + 1, x + 1, module_color_type
small_module_describe picture, y + 2, x + 1, module_color_type
Case 13:
small_module_describe picture, y, x, module_color_type
small_module_describe picture, y + 1, x, module_color_type
small_module_describe picture, y + 1, x + 1, module_color_type
small_module_describe picture, y + 1, x + 2, module_color_type
Case 14:
small_module_describe picture, y, x, module_color_type
small_module_describe picture, y - 2, x + 1, module_color_type
small_module_describe picture, y - 1, x + 1, module_color_type
small_module_describe picture, y, x + 1, module_color_type
Case 15:
small_module_describe picture, y, x, module_color_type
small_module_describe picture, y, x + 1, module_color_type
small_module_describe picture, y, x + 2, module_color_type
small_module_describe picture, y + 1, x + 2, module_color_type
Case 16:
small_module_describe picture, y, x, module_color_type
small_module_describe picture, y + 1, x, module_color_type
small_module_describe picture, y + 2, x, module_color_type
small_module_describe picture, y, x + 1, module_color_type
Case 17:
small_module_describe picture, y, x, module_color_type
small_module_describe picture, y, x + 1, module_color_type
small_module_describe picture, y + 1, x, module_color_type
small_module_describe picture, y + 1, x + 1, module_color_type
Case 18:
small_module_describe picture, y, x, module_color_type
small_module_describe picture, y, x + 1, module_color_type
small_module_describe picture, y, x + 2, module_color_type
small_module_describe picture, y, x + 3, module_color_type
Case 19:
small_module_describe picture, y, x, module_color_type
small_module_describe picture, y + 1, x, module_color_type
small_module_describe picture, y + 2, x, module_color_type
small_module_describe picture, y + 3, x, module_color_type
Case 20:
small_module_describe picture, y, x, module_color_type
End Select
End Sub
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -