⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 formqxss.frm

📁 This is a boiler test system,has been use in factory
💻 FRM
📖 第 1 页 / 共 2 页
字号:
Private Sub bangt_Click()
FlagBT = (FlagBT + 1) Mod 2
 If FlagBT = 1 Then
   bangt.Caption = "曲线"
   Me.Caption = "时实棒图"
 Else
   bangt.Caption = "棒图"
   Me.Caption = "时实曲线"
 End If
 hzbx1
 disp1
End Sub

Private Sub Command4_Click()

'--------------
zby2 = Val(Textzb(1))
zby1 = Val(Textzb(0))
If zby2 <= zby1 Then
   ww% = MsgBox("输入错误!,数值起点必须小于终点。", 1, "")
   Textzb(0).SetFocus
   Exit Sub
End If
hzbx1
disp1

Picture2.Visible = False
End Sub

Private Sub Command5_Click()
Picture2.Visible = False
End Sub

Private Sub exit1_Click()
Timer1.Enabled = False
Unload Me
End Sub

Private Sub Form_Load()
 Me.Move (Screen.Width - Width) / 2, (Screen.Height - Height) / 2

For j% = 0 To SsqxNum
  Listzm.AddItem AI_Nam(SsQxsx(j%))
Next
Listzm.Selected(1) = True

SetupDgls(0) = SetupGD(0)
SetupDgls(1) = SetupGD(1)
SetupDgls(2) = SetupGD(2)

SetupDgls(0 + 8) = SetupGD(3)
SetupDgls(1 + 8) = SetupGD(4)
SetupDgls(2 + 8) = SetupGD(5)

SetupDgls(0 + 2 * 8) = SetupGD(6)
SetupDgls(1 + 2 * 8) = SetupGD(7)
SetupDgls(2 + 2 * 8) = SetupGD(8)

Me.Height = 5910
End Sub
Private Sub Form_Unload(Cancel As Integer)
Timer1.Enabled = False
End Sub
Private Sub Listzm_Click()
Datacl
End Sub
Private Sub disp1()
Dim y1, y2 As Single
For qx% = 0 To 6
  If blxuhao(qx%) = 99 Then Exit For
  If FlagBT = 0 Then
   For jj% = zbx2 To zbx1 Step -1
     If SSPvt(blxuhao(qx%), jj%) = 9999 Then Exit For
     y2 = zby2 + zby1 - SSPvt(blxuhao(qx%), jj%)
     X2 = jj%
     If jj% = zbx2 Then y1 = y2: X1 = X2
     Picture1.Line (X1, y1)-(X2, y2), colorqx(qx%)
     y1 = y2: X1 = X2
   Next
   If SetupDgls(blxuhao(qx%)) <> "" Then
     y2 = zby2 + zby1 - SetupDgls(blxuhao(qx%))
     Picture1.Line (zbx1, y2)-(zbx2, y2), colorqx(7)
   End If
  Else
    xx1 = zby2 + zby1
    xx2 = zby2 + zby1 - SSPvt(blxuhao(qx%), 300)
     Picture1.Line (qx% * 25 + 4, xx1)-(qx% * 25 + 24, xx2), colorqx(qx%), BF
  End If
Next
End Sub

Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
''''On Error Resume Next
Dim ptd
If y < zby1 Or y > zby2 Then Exit Sub
If x < zbx1 Or x > zbx2 Then Exit Sub
'-------------------------------------
ptd = Picture1.Point(x, y)
For i% = 0 To 6
  If ptd = colorqx(i%) Then Exit For
Next
If i% >= 7 Then
   lablexy.Visible = False
   Exit Sub
End If
num1% = SsQxsx(blxuhao(i%))
ssc$ = AI_Nam(num1%) '
'----------------------
  yy1 = Int(beishu(num1%) * (zby2 + zby1 - y)) / beishu(num1%)
  bbb1$ = yy1 & DanWei(num1%) '+ "℃"
  lablexy.Visible = True
  lablexy.Caption = ssc$ + vbCrLf + " " + bbb1$
  lablexy.Move x, y + 0.8 * sty
End Sub

Private Sub printqx1_Click()
 x% = MsgBox("确实要打印 ?", 36, SysTitle)
 If x% <> 6 Then Exit Sub
 Printer.ColorMode = 2
 Printer.ForeColor = &H80000008
 Printer.Scale (zbx1 - stx * 1.2, zby1 - sty)-(zbx2 + stx * 0.9, zby2 + sty * 10) '设定标尺
 For p = zby1 To zby2 Step sty
   Printer.Line (zbx1, p)-(zbx2, p), &H80000010   '画横坐标线
   Printer.PSet (zbx1 - 0.5 * stx, p - sty / 6), &HFFFFFF
   If zby2 > 100 Then
     Printer.Print Format$(zby2 + zby1 - p, "#000") '纵坐标
   Else
     Printer.Print Format$(zby2 + zby1 - p, "#0.0#") '纵坐标
   End If
 Next p
 If blxuhao(1) = 99 Then
    Printer.PSet (zbx1 - 0.5 * stx, zby1 - sty * 0.5), &HFFFFFF
    Printer.Print DanWei(SsQxsx(blxuhao(0)))
 End If
'================================
miao2$ = Time$
miao1$ = DateAdd("s", -zbx2 * 2, Time$)
'miao1$ = Right$(miao1$, 5)
If FlagBT = 0 Then
 For q% = zbx1 To zbx2 Step stx
     Printer.Line (q%, zby1)-(q%, zby2), &H80000010
  Next
   Printer.PSet (zbx2 - 0.4 * stx, zby2 + 0.25 * sty), &HFFFFFF '横坐标值位置
   Printer.Print miao2$
   Printer.PSet (zbx1 - 0.4 * stx, zby2 + 0.25 * sty), &HFFFFFF '横坐标值位置
   Printer.Print miao1$
End If
 Printer.DrawWidth = 3
 Printer.Line (zbx1, zby2)-(zbx2, zby2), &H80000008 ' &H80000010
 Printer.Line (zbx1, zby1)-(zbx2, zby1), &H80000008
 Printer.Line (zbx1, zby2)-(zbx1, zby1), &H80000008
 Printer.Line (zbx2, zby2)-(zbx2, zby1), &H80000008
 Printer.DrawWidth = 1
 Dim y1, y2 As Single
 For qx% = 0 To 6
   If blxuhao(qx%) = 99 Then Exit For
   If FlagBT = 0 Then
     If SetupDgls(blxuhao(qx%)) <> "" And dispdgof = 0 Then
       y2 = zby2 + zby1 - SetupDgls(blxuhao(qx%))
       Printer.Line (zbx1, y2)-(zbx2, y2), colorqx(7)
       Printer.PSet (zbx2 + 0.02 * stx, y2 - 0.1 * sty), &HFFFFFF '横坐标值位置
       Printer.Print SetupDgls(blxuhao(qx%))
     End If
     For jj% = zbx2 To zbx1 Step -1
       If SSPvt(blxuhao(qx%), jj%) = 9999 Then Exit For
       y2 = zby2 + zby1 - SSPvt(blxuhao(qx%), jj%)
       X2 = jj%
       If jj% = zbx2 Then y1 = y2: X1 = X2
     '  If y1 > zby1 Then
       Printer.Line (X1, y1)-(X2, y2), colorqx(qx%)
     '  End If
       y1 = y2: X1 = X2
     Next
   Else
     xx1 = zby2 + zby1
     xx2 = zby2 + zby1 - SSPvt(blxuhao(qx%), 300)
     Printer.Line (qx% * 25 + 4, xx1)-(qx% * 25 + 24, xx2), colorqx(qx%), BF
   End If
 Next
 Printer.EndDoc
End Sub

Private Sub Timer1_Timer()
 Picture1.Cls
 For p = zby1 To zby2 Step sty
   Picture1.Line (zbx1, p)-(zbx2, p), &HE0E0E0    '画横坐标线
   Picture1.PSet (zbx1 - stx, p - sty / 6), &HFFFFFF
   If zby2 > 100 Then
     Picture1.Print Format$(zby2 + zby1 - p, "#000") '纵坐标
   Else
     Picture1.Print Format$(zby2 + zby1 - p, "#0.0#") '纵坐标
   End If
 Next p
 If blxuhao(1) = 99 Then
    Picture1.PSet (zbx1 - 0.5 * stx, zby1 - sty * 0.8), &HFFFFFF
    Picture1.Print DanWei(SsQxsx(blxuhao(0)))
 End If
'================================
miao2$ = Time$
miao1$ = DateAdd("s", -zbx2 * 2, Time$)
'miao1$ = Right$(miao1$, 5)
If FlagBT = 0 Then
 For q% = zbx1 To zbx2 Step stx
     Picture1.Line (q%, zby1)-(q%, zby2), &HC0C0C0
  Next
   Picture1.PSet (zbx2 - 0.8 * stx, zby2 + 0.35 * sty), &HFFFFFF '横坐标值位置
   Picture1.Print miao2$
   Picture1.PSet (zbx1 - 0.8 * stx, zby2 + 0.35 * sty), &HFFFFFF '横坐标值位置
   Picture1.Print miao1$
End If
 Picture1.Line (zbx1, zby2)-(zbx2, zby2), &H80000010
 Picture1.Line (zbx1, zby1)-(zbx2, zby1), &H80000010
 Picture1.Line (zbx1, zby2)-(zbx1, zby1), &H80000010
 Picture1.Line (zbx2, zby2)-(zbx2, zby1), &H80000003
  
 Dim y1, y2 As Single
 For qx% = 0 To 6
   If blxuhao(qx%) = 99 Then Exit For
   If FlagBT = 0 Then
     If SetupDgls(blxuhao(qx%)) <> "" And dispdgof = 0 Then
       y2 = zby2 + zby1 - SetupDgls(blxuhao(qx%))
       Picture1.Line (zbx1, y2)-(zbx2, y2), colorqx(7)
       Picture1.PSet (zbx2 + 0.02 * stx, y2 - 0.25 * sty), &HFFFFFF '横坐标值位置
       Picture1.Print SetupDgls(blxuhao(qx%))
     End If
     For jj% = zbx2 To zbx1 Step -1
       If SSPvt(blxuhao(qx%), jj%) = 9999 Then Exit For
       y2 = zby2 + zby1 - SSPvt(blxuhao(qx%), jj%)
       X2 = jj%
       If jj% = zbx2 Then y1 = y2: X1 = X2
     '  If y1 > zby1 Then
       Picture1.Line (X1, y1)-(X2, y2), colorqx(qx%)
     '  End If
       y1 = y2: X1 = X2
     Next
   Else
     xx1 = zby2 + zby1
     xx2 = zby2 + zby1 - SSPvt(blxuhao(qx%), 300)
     Picture1.Line (qx% * 25 + 4, xx1)-(qx% * 25 + 24, xx2), colorqx(qx%), BF
   End If
 Next
End Sub

Private Sub xsfw_Click()
Textzb(0).Text = zby1
Textzb(1).Text = zby2
Picture2.Visible = True
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -