?? frv.frm
字號:
Height = 255
Left = 120
TabIndex = 9
Top = 0
Width = 1515
End
End
Begin VB.PictureBox Picture2
BorderStyle = 0 'None
Height = 1095
Left = 360
ScaleHeight = 1095
ScaleWidth = 1875
TabIndex = 2
Top = 1500
Width = 1875
Begin 電壓表與電壓源上位機.MorphDisplay SEG1
Height = 645
Left = 60
TabIndex = 3
Top = 360
Width = 1725
_ExtentX = 2619
_ExtentY = 1138
BackColor1 = -2147483633
BackColor2 = -2147483633
BorderWidth = 0
BurnInColor = 16777215
BurnInColorNeg = 16777215
NumDigits = 4
SegmentHeight = 17
SegmentLitColor = 255
SegmentLitColorNeg= 16711680
End
Begin VB.Label Label2
Caption = "當前電壓:V"
BeginProperty Font
Name = "楷體_GB2312"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 255
Left = 120
TabIndex = 4
Top = 60
Width = 1335
End
End
Begin VB.Timer Timer1
Interval = 1000
Left = 120
Top = 240
End
Begin VB.PictureBox Picture1
Appearance = 0 'Flat
BackColor = &H80000005&
ForeColor = &H80000008&
Height = 1035
Left = -60
ScaleHeight = 1005
ScaleWidth = 8985
TabIndex = 0
Top = 0
Width = 9015
Begin VB.Label Label1
Appearance = 0 'Flat
BackColor = &H80000005&
Caption = "數字電壓表控制面板"
BeginProperty Font
Name = "楷體_GB2312"
Size = 21.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 495
Left = 900
TabIndex = 1
Top = 300
Width = 4275
End
Begin VB.Image Image1
Appearance = 0 'Flat
Height = 720
Left = 5340
Picture = "FrV.frx":1CCA
Top = 180
Width = 720
End
End
Begin VB.Label Label5
Caption = "電壓波形:"
BeginProperty Font
Name = "楷體_GB2312"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 255
Left = 2700
TabIndex = 15
Top = 1500
Width = 1215
End
End
Attribute VB_Name = "FrV"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim PicB As Boolean '用來輪流切換圖片實現動態
Dim Tbyte As Byte '發送命令
Private Sub Command1_Click()
If SEG2.Value < 1 Then
SEG2.Value = Format$(SEG2.Value + 0.01, "0.00")
If SEG1.Value <> Format$(Null, "0.00") Then
SEG1.Value = Format$(SEG1.Value + 0.01, "0.00")
End If
Else
MsgBox "已經達到上限!"
End If
End Sub
Private Sub Command2_Click()
If SEG2.Value > -1 Then
SEG2.Value = Format$(SEG2.Value - 0.01, "0.00")
If SEG1.Value <> Format$(Null, "0.00") Then
SEG1.Value = Format$(SEG1.Value - 0.01, "0.00")
End If
Else
MsgBox "已經達到下限!"
End If
End Sub
Private Sub Command3_Click()
If HZ.Value < 200 Then
HZ.Value = HZ.Value + 10
If Command8.Caption = "暫停" Then 'AD工作時發送
Call SendF
End If
Else
MsgBox "已經達到上限!"
End If
End Sub
Private Sub Command4_Click()
If HZ.Value > 10 Then
HZ.Value = HZ.Value - 10
If Command8.Caption = "暫停" Then 'AD工作時發送
Call SendF
End If
Else
MsgBox "已經達到下限!"
End If
End Sub
Private Sub Command5_Click()
Dim temp As Integer
temp = MsgBox("對不起數據庫尚在開發中...", vbOKOnly + vbInformation + vbDefaultButton1)
End Sub
Private Sub Command6_Click()
Unload Me
Form1.Show
End Sub
Private Sub Command7_Click()
If Command8.Caption = "暫停" Then '若AD還在運行則停止
Command8.Caption = "開始"
Call StopAD
End If
Unload Form1 '卸載主窗口
Unload Me
End Sub
Private Sub Command8_Click()
Static CmdSta As Boolean
If Not CmdSta Then '暫停
Call StopAD
CmdSta = True
Command8.Caption = "開始"
SEG1.Value = Format$(Null, "0.00") 'SEG復位
Else '打開
Call StartAD
CmdSta = False
Command8.Caption = "暫停"
End If
End Sub
Private Sub Form_Load()
'----------------Initialize Parameter-------------------------
'Call FrmDisCtr(FrV)
Timer1.Enabled = True
PicB = True
SEG1.Value = Format$(Null, "0.00") '設置三個SEG的初始值
SEG2.Value = Format$(0, "0.00") '
HZ.Value = 10 '
'RecNum = 0 '初始化接收個數
With StatusBar1.Panels
.Item(1).Text = "打開串口:" & OpenPort
.Item(2).Text = "設置:" & PortSet
' .Item(3).Text = "接收數據:" & RecNum
.Item(5).Text = "Power By Sphinx 2008.5"
End With
Call StartAD
End Sub
Private Sub Form_Unload(Cancel As Integer)
If Command8.Caption = "暫停" Then '若AD還在運行則停止
Call StopAD
End If
Unload Form1 '卸載主窗口
End Sub
Private Sub Timer1_Timer()
If PicB Then
Call Path("Pic/48vr.ico")
Image1.Picture = LoadPicture(FullPath)
'Image1.Picture = LoadPicture(".\Pic\48vr.ico")
PicB = False
Else
Call Path("Pic/48vb.ico")
Image1.Picture = LoadPicture(FullPath)
'Image1.Picture = LoadPicture(".\Pic\48vb.ico")
PicB = True
End If
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -