practice12_1.frm
来自「深圳大学的vb上机与教学的课件」· FRM 代码 · 共 238 行
FRM
238 行
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "Comdlg32.ocx"
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 2775
ClientLeft = 60
ClientTop = 345
ClientWidth = 4140
LinkTopic = "Form1"
ScaleHeight = 2775
ScaleWidth = 4140
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox Text5
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1005
TabIndex = 10
Top = 2160
Width = 1575
End
Begin VB.TextBox Text2
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1005
TabIndex = 1
Top = 596
Width = 1575
End
Begin MSComDlg.CommonDialog CommonDialog1
Left = 3000
Top = 1440
_ExtentX = 847
_ExtentY = 847
_Version = 393216
DefaultExt = "txt"
DialogTitle = "请选择要保存的文件名"
Filter = "文本文件(*.txt)|*.txt"
InitDir = "d:\"
End
Begin VB.CommandButton Command2
Caption = "退出"
Height = 495
Left = 2880
TabIndex = 8
Top = 840
Width = 975
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 495
Left = 2880
TabIndex = 7
Top = 240
Width = 975
End
Begin VB.TextBox Text3
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1005
TabIndex = 2
Top = 1117
Width = 1575
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1005
TabIndex = 0
Top = 75
Width = 1575
End
Begin VB.TextBox Text4
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1005
TabIndex = 3
Top = 1638
Width = 1575
End
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "计算机:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 165
TabIndex = 11
Top = 2250
Width = 840
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "姓 名:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 165
TabIndex = 9
Top = 705
Width = 840
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "物 理:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 165
TabIndex = 6
Top = 1770
Width = 840
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "数 学:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 165
TabIndex = 5
Top = 1230
Width = 840
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "学 号:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 165
TabIndex = 4
Top = 165
Width = 840
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
CommonDialog1.ShowSave
Open CommonDialog1.FileName For Output As #1
End Sub
Private Sub Command1_Click()
no = Text1.Text
na = Text2.Text
g1 = Val(Text3.Text)
g2 = Val(Text4.Text)
g3 = Val(Text5.Text)
Write #1, no, na, g1, g2, g3
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
End Sub
Private Sub Command2_Click()
Close #1
End
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?