📄 testaddsnow.frm
字号:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Object = "{10CE3D58-0485-11D4-A186-E810A974E763}#1.0#0"; "ADDSNOW.OCX"
Begin VB.Form Form1
BorderStyle = 1 'Fixed Single
Caption = "Test Add Snow Ctrol v1.0 By DragonJiang"
ClientHeight = 3720
ClientLeft = 45
ClientTop = 330
ClientWidth = 5640
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3720
ScaleWidth = 5640
StartUpPosition = 3 '窗口缺省
Begin MSComDlg.CommonDialog Dlg
Left = 720
Top = 1680
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin MSComCtl2.UpDown UpDown
Height = 255
Index = 0
Left = 3840
TabIndex = 14
Top = 3360
Width = 270
_ExtentX = 423
_ExtentY = 450
_Version = 393216
Max = 3000
Min = -1
Enabled = -1 'True
End
Begin VB.TextBox TextVal
Enabled = 0 'False
Height = 270
Index = 4
Left = 4920
TabIndex = 13
Top = 2760
Width = 375
End
Begin VB.TextBox TextVal
Enabled = 0 'False
Height = 270
Index = 3
Left = 4920
TabIndex = 12
Top = 2400
Width = 375
End
Begin VB.TextBox TextVal
Enabled = 0 'False
Height = 270
Index = 2
Left = 4920
TabIndex = 11
Top = 2040
Width = 375
End
Begin VB.TextBox TextVal
Enabled = 0 'False
Height = 270
Index = 1
Left = 4920
TabIndex = 10
Top = 1680
Width = 375
End
Begin VB.TextBox TextVal
Enabled = 0 'False
Height = 270
Index = 0
Left = 3480
TabIndex = 9
Top = 3360
Width = 375
End
Begin VB.CommandButton AboutButton
Caption = "About"
Height = 375
Left = 4320
TabIndex = 6
Top = 1080
Width = 1215
End
Begin VB.CommandButton FontButton
Caption = "Font"
Height = 375
Left = 4320
TabIndex = 5
Top = 600
Width = 1215
End
Begin VB.CommandButton OpenButton
Caption = "Open"
Height = 375
Left = 4320
TabIndex = 4
Top = 120
Width = 1215
End
Begin VB.TextBox TextString
Height = 270
Left = 720
TabIndex = 3
Top = 3360
Width = 2175
End
Begin AddSnowCtrl.CtrlSnow CtrlSnow
Height = 3135
Left = 120
TabIndex = 0
Top = 120
Width = 4095
_ExtentX = 7223
_ExtentY = 5530
BackColor = -2147483640
TextColor = 255
End
Begin MSComCtl2.UpDown UpDown
Height = 255
Index = 1
Left = 5280
TabIndex = 15
Top = 1680
Width = 270
_ExtentX = 423
_ExtentY = 450
_Version = 393216
Max = 500
Enabled = -1 'True
End
Begin MSComCtl2.UpDown UpDown
Height = 255
Index = 2
Left = 5280
TabIndex = 16
Top = 2040
Width = 270
_ExtentX = 423
_ExtentY = 450
_Version = 393216
Max = 500
Enabled = -1 'True
End
Begin MSComCtl2.UpDown UpDown
Height = 255
Index = 3
Left = 5280
TabIndex = 17
Top = 2400
Width = 270
_ExtentX = 423
_ExtentY = 450
_Version = 393216
Max = 500
Enabled = -1 'True
End
Begin MSComCtl2.UpDown UpDown
Height = 255
Index = 4
Left = 5280
TabIndex = 18
Top = 2760
Width = 270
_ExtentX = 423
_ExtentY = 450
_Version = 393216
Max = 500
Enabled = -1 'True
End
Begin VB.Label Label6
Caption = "Speed:"
Height = 375
Left = 4320
TabIndex = 22
Top = 2760
Width = 735
End
Begin VB.Label Label5
Caption = "Far:"
Height = 375
Left = 4320
TabIndex = 21
Top = 2400
Width = 375
End
Begin VB.Label Label4
Caption = "Mid:"
Height = 255
Left = 4320
TabIndex = 20
Top = 2040
Width = 375
End
Begin VB.Label Label3
Caption = "Near:"
Height = 255
Left = 4320
TabIndex = 19
Top = 1680
Width = 615
End
Begin VB.Label Label2
Caption = "Y:"
Height = 375
Left = 3120
TabIndex = 8
Top = 3360
Width = 375
End
Begin VB.Label Label1
Caption = "Text:"
Height = 375
Left = 120
TabIndex = 7
Top = 3360
Width = 495
End
Begin VB.Label ForeColorFrame
BorderStyle = 1 'Fixed Single
Height = 375
Left = 4560
TabIndex = 1
Top = 3120
Width = 495
End
Begin VB.Label BackColorFrame
BorderStyle = 1 'Fixed Single
Height = 375
Left = 4800
TabIndex = 2
Top = 3240
Width = 495
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub AboutButton_Click()
CtrlSnow.AboutBox
End Sub
Private Sub OpenButton_Click()
On Error GoTo exitOpen
Dlg.Filter = "所有的图形文件|(*.bmp;*.jpg;*.wfm;*.emf;*.ico;*.rle;*.gif;*.cur)|JPEG文件|*.jpg|BMP文件|(*.bmp)|GIF文件|*.gif|光标(*.Ico)和图标(*.Cur)文件|(*.cur,*.ico)|WMF元文件(*.wmf,*.emf)|(*.wmf,*.emf)|RLE行程文件(*.rle)|*.rle"
Dlg.ShowOpen
CtrlSnow.BackPictureName = Dlg.FileName
exitOpen:
End Sub
Private Sub FontButton_Click()
On Error GoTo exitFont
Dlg.Flags = cdlCFBoth
Dlg.ShowFont
CtrlSnow.FontName = Dlg.FontName
CtrlSnow.FontSize = Dlg.FontSize
exitFont:
End Sub
Private Sub Form_Load()
Dlg.CancelError = True
UpDown(1).Value = CtrlSnow.NearSnowNum
UpDown(0).Value = CtrlSnow.TextOffsetY
UpDown(2).Value = CtrlSnow.MidSnowNum
UpDown(3).Value = CtrlSnow.FarSnowNum
UpDown(4).Value = CtrlSnow.Speed
ForeColorFrame.BackColor = CtrlSnow.TextColor
BackColorFrame.BackColor = CtrlSnow.BackColor
TextString.Text = CtrlSnow.TextString
End Sub
Private Sub ForeColorFrame_Click()
On Error GoTo exitfColor
Dlg.ShowColor
CtrlSnow.TextColor = Dlg.Color
ForeColorFrame.BackColor = Dlg.Color
exitfColor:
End Sub
Private Sub backColorFrame_Click()
On Error GoTo exitBkColor
Dlg.ShowColor
CtrlSnow.BackColor = Dlg.Color
BackColorFrame.BackColor = Dlg.Color
exitBkColor:
End Sub
Private Sub textString_Change()
CtrlSnow.TextString = TextString.Text
End Sub
Private Sub UpDown_Change(I As Integer)
Dim n As Integer
TextVal(I).Text = UpDown(I).Value
n = UpDown(I).Value
Select Case I
Case 0
CtrlSnow.TextOffsetY = n
Case 1
CtrlSnow.NearSnowNum = n
Case 2
CtrlSnow.MidSnowNum = n
Case 3
CtrlSnow.FarSnowNum = n
Case 4
CtrlSnow.Speed = n
End Select
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -