frmslider.frm
来自「Visual Basic 6 大学教程的代码」· FRM 代码 · 共 58 行
FRM
58 行
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form frmSlider
Caption = "Fig. 10.29: Slider"
ClientHeight = 1230
ClientLeft = 5115
ClientTop = 4755
ClientWidth = 5490
LinkTopic = "Form1"
ScaleHeight = 1230
ScaleWidth = 5490
Begin MSComctlLib.Slider sldVolume
Height = 630
Left = 120
TabIndex = 2
Top = 480
Width = 4095
_ExtentX = 7223
_ExtentY = 1111
_Version = 393216
Max = 20
End
Begin VB.Label lblDb
BorderStyle = 1 'Fixed Single
Caption = "0 dB"
Height = 240
Left = 4560
TabIndex = 1
Top = 585
Width = 510
End
Begin VB.Label lblLabel
Caption = "Volume"
Height = 270
Left = 240
TabIndex = 0
Top = 180
Width = 1215
End
End
Attribute VB_Name = "frmSlider"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
' Fig. 10.29
' Demonstrating the Slider control
Option Explicit ' General declaration
Private Sub sldVolume_Change()
lblDb.Caption = sldVolume.Value & " dB"
End Sub
Private Sub sldVolume_Scroll()
lblDb.Caption = sldVolume.Value & " dB"
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?