?? frmtimecurve.frm
字號:
VERSION 5.00
Begin VB.Form TimeDisply
Caption = "Form2"
ClientHeight = 8175
ClientLeft = 60
ClientTop = 450
ClientWidth = 11430
LinkTopic = "Form2"
ScaleHeight = 8175
ScaleWidth = 11430
StartUpPosition = 3 '窗口缺省
Begin VB.Data Data1
Caption = "Data1"
Connect = "Access"
DatabaseName = ""
DefaultCursorType= 0 '缺省游標
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
Height = 345
Left = 540
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = ""
Top = 6570
Width = 1635
End
Begin VB.CommandButton Command2
Caption = "Command2"
Height = 285
Left = 2040
TabIndex = 2
Top = 60
Width = 2085
End
Begin VB.Timer Timer1
Left = 0
Top = 450
End
Begin VB.PictureBox picOut
Height = 5745
Left = 570
ScaleHeight = 5685
ScaleWidth = 7545
TabIndex = 1
Top = 390
Width = 7605
End
Begin VB.CommandButton cmdDemo
Caption = "PIC"
Height = 345
Left = 1200
TabIndex = 0
Top = 0
Width = 525
End
End
Attribute VB_Name = "TimeDisply"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
'下面的是modGDI模塊
'===========================================================
'GDI實時曲線繪制演示
' =========================================
' 新建一個工程 , 在窗體中添加按鈕cmdDemo, 圖片框picOut, 時鐘控件Timer
' 下面的是frmMain窗體
Dim CurveDrawer As clsCurve
Dim tempDatabase, tempData As Single
Private Sub cmdDemo_Click()
Dim nY As Long
CurveDrawer.SetView picOut.hdc, picOut.Width - 10, picOut.Height - 10, 50, 50
Timer1.Enabled = True
End Sub
Private Sub Form_Load()
ScaleMode = 3
Timer1.Interval = 200000
Timer1.Enabled = False
Set CurveDrawer = New clsCurve
tempDatabase = App.Path + "\Data\InnerData\數據管理器97.mdb"
Data1.DatabaseName = tempDatabase
End Sub
Private Sub picOut_Paint()
CurveDrawer.RedrawCurve
End Sub
Private Sub Timer1_Timer()
'度數據
Data1.RecordSource = "實時工程參數" '讀取當前數據點????
Data1.Refresh
Do While Not Data1.Recordset.EOF
If Not IsNull(Data1.Recordset("立壓")) Then tempData = Data1.Recordset("立壓")
If Data1.Recordset.EOF Then
Data1.Recordset.MoveFirst
Exit Do 'GoTo Eee
Else
Data1.Recordset.MoveNext
End If
Loop
' CurveDrawer.DrawCurve CLng(tempData)
CurveDrawer.DrawCurve CLng(Rnd * 50)
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -