?? shape.frm
字號:
VERSION 5.00
Begin VB.Form Form1
Caption = "Shape"
ClientHeight = 3510
ClientLeft = 60
ClientTop = 390
ClientWidth = 4680
ControlBox = 0 'False
LinkTopic = "Form1"
ScaleHeight = 3510
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.ListBox BorderS
Height = 240
Left = 2880
TabIndex = 12
Top = 3240
Width = 1455
End
Begin VB.HScrollBar HScroll1
Height = 255
Left = 2880
Max = 6
Min = 1
TabIndex = 11
Top = 2520
Value = 1
Width = 1455
End
Begin VB.ListBox FillS
Height = 240
Left = 2880
TabIndex = 9
Top = 2880
Width = 1455
End
Begin VB.CommandButton Command1
Caption = "退出"
Height = 255
Index = 6
Left = 120
TabIndex = 7
Top = 3120
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "圓角正方形"
Height = 255
Index = 5
Left = 120
TabIndex = 5
Top = 2640
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "圓角矩形"
Height = 255
Index = 4
Left = 120
TabIndex = 4
Top = 2160
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "圓"
Height = 255
Index = 3
Left = 120
TabIndex = 3
Top = 1680
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "橢圓"
Height = 255
Index = 2
Left = 120
TabIndex = 2
Top = 1200
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "正方形"
Height = 255
Index = 1
Left = 120
TabIndex = 1
Top = 720
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "矩形"
Height = 255
Index = 0
Left = 120
TabIndex = 0
Top = 240
Width = 1215
End
Begin VB.Label Label4
Caption = "邊框樣式"
Height = 255
Left = 1920
TabIndex = 13
Top = 3240
Width = 735
End
Begin VB.Label Label3
Caption = "邊框寬度"
Height = 255
Left = 1920
TabIndex = 10
Top = 2520
Width = 735
End
Begin VB.Label Label2
Caption = "填充方式"
Height = 255
Left = 1920
TabIndex = 8
Top = 2880
Width = 735
End
Begin VB.Label Label1
Caption = " "
Height = 255
Left = 1920
TabIndex = 6
Top = 2040
Width = 2415
End
Begin VB.Shape Shape1
Height = 1695
Left = 1920
Top = 240
Width = 2415
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
' 設置Shape控件外觀
Private Sub Command1_Click(Index As Integer)
Select Case Index
Case 0 ' 繪制矩形
Shape1.Shape = 0
Case 1 ' 繪制正方形
Shape1.Shape = 1
Case 2 ' 繪制橢圓
Shape1.Shape = 2
Case 3 ' 繪制圓
Shape1.Shape = 3
Case 4 ' 繪制圓角矩形
Shape1.Shape = 4
Case 5 ' 繪制圓角正方形
Shape1.Shape = 5
Case 6 ' 結束退出
End
End Select
End Sub
Private Sub BorderS_Scroll()
Call BorderS_Click
End Sub
Private Sub BorderS_Click()
If BorderS.ListIndex <> "-1" Then
' 設置邊框樣式
Shape1.BorderStyle = BorderS.ListIndex
End If
End Sub
Private Sub FillS_Scroll()
Call FillS_Click
End Sub
Private Sub FillS_Click()
If FillS.ListIndex <> "-1" Then
' 設置填充方式
Shape1.FillStyle = FillS.ListIndex
End If
End Sub
' 設置邊框寬度
Private Sub HScroll1_Change()
Shape1.BorderWidth = HScroll1.Value
End Sub
' 初始話列表框選項
Private Sub Form_Load()
' 初始話列表框選項
With FillS
.AddItem "0 實線"
.AddItem "1 透明"
.AddItem "2 水平直線"
.AddItem "3 垂直直線"
.AddItem "4 上斜對角線"
.AddItem "5 下斜對角線"
.AddItem "6 十字線"
.AddItem "7 交叉對角線"
End With
With BorderS
.AddItem "0 透明"
.AddItem "1 實線"
.AddItem "2 虛線"
.AddItem "3 點線"
.AddItem "4 點劃線"
.AddItem "5 雙點劃線"
.AddItem "6 內收實線"
End With
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -