📄 form3.frm
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form Form3
Caption = "试验结果 天津大学自动化系研发 电机试验台二"
ClientHeight = 6660
ClientLeft = 3780
ClientTop = 795
ClientWidth = 7665
BeginProperty Font
Name = "仿宋_GB2312"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
LinkTopic = "Form3"
ScaleHeight = 11115
ScaleWidth = 15240
WindowState = 2 'Maximized
Begin VB.Timer Timer2
Interval = 100
Left = 120
Top = 3000
End
Begin VB.Timer Timer1
Interval = 100
Left = 13800
Top = 6480
End
Begin VB.Frame Frame2
Caption = "请选择要查看的曲线"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 1215
Left = 8040
TabIndex = 16
Top = 8880
Width = 1935
Begin VB.ListBox List1
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 600
ItemData = "Form3.frx":0000
Left = 360
List = "Form3.frx":0010
TabIndex = 17
Top = 360
Width = 1215
End
End
Begin VB.Frame Frame1
Caption = "请选择操作内容"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 1215
Left = 600
TabIndex = 9
Top = 8760
Width = 5535
Begin VB.CommandButton Command4
Caption = "打印曲线"
BeginProperty Font
Name = "楷体_GB2312"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 600
TabIndex = 13
Top = 720
Width = 1815
End
Begin VB.CommandButton Command2
Caption = "打印报表"
BeginProperty Font
Name = "楷体_GB2312"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 600
TabIndex = 12
Top = 240
Width = 1815
End
Begin VB.CommandButton Command1
Caption = "退 出"
BeginProperty Font
Name = "楷体_GB2312"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 3480
TabIndex = 11
Top = 720
Width = 1935
End
Begin VB.CommandButton Command3
Caption = "查询历史数据"
BeginProperty Font
Name = "楷体_GB2312"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 3480
TabIndex = 10
Top = 240
Width = 1935
End
End
Begin MSFlexGridLib.MSFlexGrid MSFlexGrid1
Height = 2775
Left = 1320
TabIndex = 4
ToolTipText = "报表日期"
Top = 960
Width = 4695
_ExtentX = 8281
_ExtentY = 4895
_Version = 393216
Rows = 12
Cols = 5
GridLinesFixed = 1
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin VB.PictureBox Picture3
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 3255
Left = 720
ScaleHeight = 3195
ScaleWidth = 5595
TabIndex = 3
Top = 4680
Width = 5655
Begin VB.Shape Shape3
Height = 3255
Left = 0
Top = 0
Width = 5655
End
End
Begin VB.PictureBox Picture2
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 3255
Left = 7200
ScaleHeight = 3195
ScaleWidth = 6195
TabIndex = 2
Top = 4680
Width = 6255
Begin VB.Shape Shape2
Height = 3255
Left = 0
Top = 0
Width = 6255
End
End
Begin VB.PictureBox Picture1
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 3135
Left = 7200
ScaleHeight = 3075
ScaleWidth = 6195
TabIndex = 1
Top = 840
Width = 6255
Begin VB.Shape Shape1
Height = 3135
Left = 0
Top = 0
Width = 6975
End
End
Begin VB.Label Label9
Caption = "转矩(N.m)"
BeginProperty Font
Name = "楷体_GB2312"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00C00000&
Height = 255
Left = 7320
TabIndex = 22
Top = 4440
Width = 1095
End
Begin VB.Label Label8
Caption = "电流(A)"
BeginProperty Font
Name = "楷体_GB2312"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00C00000&
Height = 255
Left = 720
TabIndex = 21
Top = 4440
Width = 735
End
Begin VB.Label Label7
Caption = "速度(rpm)"
BeginProperty Font
Name = "楷体_GB2312"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00C00000&
Height = 255
Left = 7200
TabIndex = 20
Top = 600
Width = 975
End
Begin VB.Label Label11
Caption = "时间(s)"
BeginProperty Font
Name = "楷体_GB2312"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00C00000&
Height = 255
Left = 12720
TabIndex = 19
Top = 8160
Width = 855
End
Begin VB.Label Label10
Caption = "时间(s)"
BeginProperty Font
Name = "楷体_GB2312"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00C00000&
Height = 255
Left = 12480
TabIndex = 18
Top = 4320
Width = 1095
End
Begin VB.Label Label6
Caption = "编号:"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 5040
TabIndex = 15
Top = 480
Width = 615
End
Begin VB.Label Label5
Caption = "Label5"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 5760
TabIndex = 14
Top = 480
Width = 1695
End
Begin VB.Label Label4
Caption = "转矩-时间 曲线"
BeginProperty Font
Name = "楷体_GB2312"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00C00000&
Height = 255
Left = 8640
TabIndex = 8
Top = 6720
Width = 1575
End
Begin VB.Label Label3
Caption = "电流-时间 曲线"
BeginProperty Font
Name = "楷体_GB2312"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00C00000&
Height = 255
Left = 2160
TabIndex = 7
Top = 6720
Width = 1575
End
Begin VB.Label Label2
Caption = "时间(s)"
BeginProperty Font
Name = "楷体_GB2312"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00C00000&
Height = 255
Left = 5520
TabIndex = 6
Top = 8160
Width = 855
End
Begin VB.Label Label1
Caption = "数据报表"
BeginProperty Font
Name = "楷体_GB2312"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00C00000&
Height = 255
Left = 3240
TabIndex = 5
Top = 3960
Width = 855
End
Begin VB.Label label
Caption = "实 验 结 果"
BeginProperty Font
Name = "楷体_GB2312"
Size = 15.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00C00000&
Height = 375
Left = 5160
TabIndex = 0
Top = 120
Width = 2415
End
End
Attribute VB_Name = "Form3"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim marx0, mary0, marx1, mary1, speedx0, speedy0, speedx1, speedy1, currentx0, currenty0, currentx1, currenty1
Dim t
Dim mingtopmargin As Long
Dim mingleftmargin As Long
Dim mingheaderfontsize As Long
Dim mingbodyfontsize As Long
Dim mstrheaderfontname As String
Dim mstrbodyfontname As String
Dim db As Database
Dim rd
Dim n
Dim xs, ys
Dim xc, yc
Dim xm, ym
Dim xs1, ys1
Dim xc1, yc1
Dim xm1, ym1
Private Sub Command1_Click()
End
End Sub
Private Sub Command2_Click()
printreport
'Dim old_width As Integer
'MSFlexGrid1.Width = Printer.Width
'Printer.PaintPicture MSFlexGrid1.Picture, 0, 0
'MSFlexGrid1.Width = old_width
Printer.EndDoc
End Sub
Private Sub Command3_Click()
Form4.Show
Unload Form3
End Sub
Private Sub Command4_Click()
strnum = Mid(reportrd.Fields("表名"), 16, Len(reportrd.Fields("表名")) - 15)
Dim h1, w1
h1 = 20
w1 = 80
Printer.ScaleMode = vbPoints
mingtopmargin = 12
mingleftmargin = 50
mingheaderfontsize = 20
mingbodyfontsize = 14
mstrheaderfontname = "arial"
mstrbodyfontname = "times new roman"
Printer.CurrentX = mingleftmargin + 150
Printer.CurrentY = mingtopmargin + 20
With Printer.Font
.Name = mstrheaderfontname
.size = mingheaderfontsize
.Bold = True
End With
Printer.Print "电机" + Mid(List1.Text, 1, 2) + "试验曲线"
Printer.CurrentX = mingleftmargin + 300
Printer.CurrentY = mingtopmargin + 45
With Printer.Font
.Name = mstrbodyfontname
.size = 14
.Bold = False
End With
Printer.Print "报表编号: "
With Printer.Font
.Name = mstrbodyfontname
.size = 12
.Bold = False
End With
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -