📄 frmproperties.frm
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form frmProperties
BorderStyle = 3 'Fixed Dialog
Caption = "Device Properties"
ClientHeight = 5220
ClientLeft = 45
ClientTop = 330
ClientWidth = 6225
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 5220
ScaleWidth = 6225
ShowInTaskbar = 0 'False
StartUpPosition = 3 'Windows Default
Begin VB.Frame Frame1
Caption = "Bayer Conversion"
Height = 1335
Left = 360
TabIndex = 27
Top = 3480
Width = 3135
Begin VB.ComboBox ComboBayerToRGB
Height = 315
Left = 1440
TabIndex = 29
Text = "Bayer"
Top = 360
Width = 1575
End
Begin VB.ComboBox ComboConversionType
Height = 315
Left = 1440
TabIndex = 28
Text = "Type"
Top = 840
Width = 1575
End
Begin VB.Label Label1
Caption = "Bayer to RGB"
Height = 255
Left = 240
TabIndex = 31
Top = 360
Width = 1095
End
Begin VB.Label Label2
Caption = "Conversion Type"
Height = 255
Left = 120
TabIndex = 30
Top = 840
Width = 1335
End
End
Begin VB.Frame VideoMode
Caption = "Video Mode"
Height = 855
Left = 360
TabIndex = 25
Top = 2520
Width = 3135
Begin VB.ComboBox ComboVideoMode
Height = 315
Left = 240
TabIndex = 26
Text = "mode"
Top = 360
Width = 2775
End
End
Begin VB.Frame ScalarFeatures
Caption = "Scalar Features"
Height = 855
Left = 360
TabIndex = 12
Top = 600
Width = 5535
Begin VB.HScrollBar HScrollGain
Height = 255
Left = 2880
TabIndex = 22
Top = 480
Width = 1815
End
Begin VB.HScrollBar HScrollShutter
Height = 255
Left = 240
TabIndex = 21
Top = 480
Width = 1815
End
Begin VB.TextBox TextShutter
Height = 285
Left = 2160
TabIndex = 14
Text = "Text1"
Top = 480
Width = 615
End
Begin VB.TextBox TextGain
Height = 285
Left = 4800
TabIndex = 13
Text = "Text2"
Top = 480
Width = 615
End
Begin VB.Label Label15
Alignment = 2 'Center
Caption = "Shutter"
Height = 255
Left = 840
TabIndex = 20
Top = 240
Width = 615
End
Begin VB.Label LabelShutterMin
Alignment = 2 'Center
Caption = "1"
Height = 255
Left = 120
TabIndex = 19
Top = 240
Width = 495
End
Begin VB.Label LabelShutterMax
Alignment = 2 'Center
Caption = "100"
Height = 255
Left = 1680
TabIndex = 18
Top = 240
Width = 495
End
Begin VB.Label LabelGainMin
Alignment = 2 'Center
Caption = "1"
Height = 255
Left = 2760
TabIndex = 17
Top = 240
Width = 495
End
Begin VB.Label Label11
Alignment = 2 'Center
Caption = "Gain"
Height = 255
Left = 3480
TabIndex = 16
Top = 240
Width = 615
End
Begin VB.Label LabelGainMax
Alignment = 2 'Center
Caption = "100"
Height = 255
Left = 4320
TabIndex = 15
Top = 240
Width = 375
End
End
Begin VB.Frame WhiteBalance
Caption = "White Balance"
Height = 855
Left = 360
TabIndex = 3
Top = 1560
Width = 5535
Begin VB.HScrollBar HScrollV
Height = 255
Left = 2880
TabIndex = 24
Top = 480
Width = 1815
End
Begin VB.HScrollBar HScrollU
Height = 255
Left = 240
TabIndex = 23
Top = 480
Width = 1815
End
Begin VB.TextBox TextV
Height = 285
Left = 4800
TabIndex = 10
Text = "Text2"
Top = 480
Width = 615
End
Begin VB.TextBox TextU
Height = 285
Left = 2160
TabIndex = 7
Text = "Text1"
Top = 480
Width = 615
End
Begin VB.Label LabelVMax
Alignment = 2 'Center
Caption = "100"
Height = 255
Left = 4320
TabIndex = 11
Top = 240
Width = 375
End
Begin VB.Label Label8
Alignment = 2 'Center
Caption = "V"
Height = 255
Left = 3480
TabIndex = 9
Top = 240
Width = 615
End
Begin VB.Label LabelVMin
Alignment = 2 'Center
Caption = "1"
Height = 255
Left = 2760
TabIndex = 8
Top = 240
Width = 495
End
Begin VB.Label LabelUMax
Alignment = 2 'Center
Caption = "100"
Height = 255
Left = 1680
TabIndex = 6
Top = 240
Width = 495
End
Begin VB.Label LabelUMin
Alignment = 2 'Center
Caption = "1"
Height = 255
Left = 120
TabIndex = 5
Top = 240
Width = 495
End
Begin VB.Label Label3
Alignment = 2 'Center
Caption = "U"
Height = 255
Left = 840
TabIndex = 4
Top = 240
Width = 615
End
End
Begin VB.Frame ADCLevel
Caption = "ADC Level"
Height = 855
Left = 3720
TabIndex = 1
Top = 2520
Width = 2175
Begin VB.ComboBox ComboADCLevel
Height = 315
Left = 120
TabIndex = 2
Text = "adc"
Top = 360
Width = 1695
End
End
Begin MSComctlLib.TabStrip TabStrip1
Height = 4935
Left = 120
TabIndex = 0
Top = 120
Width = 6015
_ExtentX = 10610
_ExtentY = 8705
_Version = 393216
BeginProperty Tabs {1EFB6598-857C-11D1-B16A-00C0F0283628}
NumTabs = 1
BeginProperty Tab1 {1EFB659A-857C-11D1-B16A-00C0F0283628}
Caption = "Properties"
ImageVarType = 2
EndProperty
EndProperty
End
End
Attribute VB_Name = "frmProperties"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub ComboADCLevel_Click()
frmMain.HVDevice.ADCLevel = ComboADCLevel.ListIndex
End Sub
Private Sub ComboBayerToRGB_Click()
frmMain.HVDevice.BayerToRGBConversion = ComboBayerToRGB.ListIndex
End Sub
Private Sub ComboConversionType_Click()
frmMain.HVDevice.ConversionType = ComboConversionType.ListIndex
End Sub
Private Sub ComboVideoMode_Click()
frmMain.HVDevice.Resolution = ComboVideoMode.ListIndex
End Sub
Private Sub Form_Load()
Dim Min As Long
Dim Max As Long
Dim Width As Long
Dim Height As Long
frmMain.HVDevice.GetPropertyValueRange 2, Min, Max
LabelShutterMin.Caption = Min
LabelShutterMax.Caption = Max
HScrollShutter.Min = Min
HScrollShutter.Max = Max
HScrollShutter.Value = frmMain.HVDevice.Shutter
TextShutter.Text = frmMain.HVDevice.Shutter
frmMain.HVDevice.GetPropertyValueRange 3, Min, Max
LabelGainMin.Caption = Min
LabelGainMax.Caption = Max
HScrollGain.Min = Min
HScrollGain.Max = Max
HScrollGain.Value = frmMain.HVDevice.Gain
TextGain.Text = frmMain.HVDevice.Gain
LabelUMin.Caption = 10
LabelUMax.Caption = 500
HScrollU.Min = 10
HScrollU.Max = 500
HScrollU.Value = frmMain.HVDevice.GainB
TextU.Text = frmMain.HVDevice.GainB
LabelVMin.Caption = 10
LabelVMax.Caption = 500
HScrollV.Min = 10
HScrollV.Max = 500
HScrollV.Value = frmMain.HVDevice.GainR
TextV.Text = frmMain.HVDevice.GainR
frmMain.HVDevice.GetPropertyValueRange 1, Min, Max
For i = Min To Max
frmMain.HVDevice.GetSensorSize i, Width, Height
ComboVideoMode.AddItem "Mode " + CStr(i) + " ( " + CStr(Width) + " * " + CStr(Height) + " )"
Next i
ComboVideoMode.ListIndex = frmMain.HVDevice.Resolution
For i = 0 To 3
ComboADCLevel.AddItem "ADC Level " + CStr(i)
Next i
ComboADCLevel.ListIndex = frmMain.HVDevice.ADCLevel
ComboBayerToRGB.AddItem "Disabled"
ComboBayerToRGB.AddItem "Enabled ( GBRG )"
ComboBayerToRGB.AddItem "Enabled ( GRBG )"
ComboBayerToRGB.AddItem "Enabled ( BGGR )"
ComboBayerToRGB.AddItem "Enabled ( RGGB )"
ComboBayerToRGB.ListIndex = frmMain.HVDevice.BayerToRGBConversion
ComboConversionType.AddItem "Fast"
ComboConversionType.AddItem "Normal"
ComboConversionType.AddItem "Best"
ComboConversionType.ListIndex = frmMain.HVDevice.ConversionType
End Sub
Private Sub HScrollShutter_Scroll()
TextShutter.Text = HScrollShutter.Value
frmMain.HVDevice.Shutter = HScrollShutter.Value
End Sub
Private Sub TextShutter_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then
HScrollShutter.Value = TextShutter.Text
frmMain.HVDevice.Shutter = HScrollShutter.Value
End If
End Sub
Private Sub TextShutter_LostFocus()
HScrollShutter.Value = TextShutter.Text
frmMain.HVDevice.Shutter = HScrollShutter.Value
End Sub
Private Sub HScrollGain_Scroll()
TextGain.Text = HScrollGain.Value
frmMain.HVDevice.Gain = HScrollGain.Value
End Sub
Private Sub TextGain_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then
HScrollGain.Value = TextGain.Text
frmMain.HVDevice.Gain = HScrollGain.Value
End If
End Sub
Private Sub TextGain_LostFocus()
HScrollGain.Value = TextGain.Text
frmMain.HVDevice.Gain = HScrollGain.Value
End Sub
Private Sub HScrollU_Scroll()
TextU.Text = HScrollU.Value
frmMain.HVDevice.GainB = HScrollU.Value
End Sub
Private Sub TextU_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then
HScrollU.Value = TextU.Text
frmMain.HVDevice.GainB = HScrollU.Value
End If
End Sub
Private Sub TextU_LostFocus()
HScrollU.Value = TextU.Text
frmMain.HVDevice.GainB = HScrollU.Value
End Sub
Private Sub HScrollV_Scroll()
TextV.Text = HScrollV.Value
frmMain.HVDevice.GainR = HScrollV.Value
End Sub
Private Sub TextV_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then
HScrollV.Value = TextV.Text
frmMain.HVDevice.GainR = HScrollV.Value
End If
End Sub
Private Sub TextV_LostFocus()
HScrollV.Value = TextV.Text
frmMain.HVDevice.GainR = HScrollV.Value
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -