l_PersonForm.frm
资源名称:20100505.zip [点击查看]
上传用户:valvecn
上传日期:2022-03-24
资源大小:10k
文件大小:17k
源码类别:
行业应用
开发平台:
Visual Basic
- VERSION 5.00
- Begin VB.Form l_PersonForm
- Caption = "Form1"
- ClientHeight = 8595
- ClientLeft = 60
- ClientTop = 345
- ClientWidth = 11880
- LinkTopic = "Form1"
- ScaleHeight = 8595
- ScaleWidth = 11880
- StartUpPosition = 1 '所有者中心
- Begin VB.CommandButton l_CommandPer
- Caption = "Command1"
- Height = 375
- Index = 2
- Left = 8040
- TabIndex = 44
- Top = 7200
- Width = 1215
- End
- Begin VB.CommandButton l_CommandPer
- Caption = "Command1"
- Height = 375
- Index = 1
- Left = 6480
- TabIndex = 43
- Top = 7200
- Width = 1215
- End
- Begin VB.CommandButton l_CommandPer
- Caption = "Command1"
- Height = 375
- Index = 0
- Left = 4920
- TabIndex = 42
- Top = 7200
- Width = 1215
- End
- Begin VB.Timer l_TimerPer
- Enabled = 0 'False
- Left = 240
- Top = 8160
- End
- Begin VB.TextBox l_TextName
- Height = 375
- Index = 19
- Left = 7320
- TabIndex = 21
- Text = "Text1"
- Top = 3720
- Width = 1095
- End
- Begin VB.TextBox l_TextName
- Height = 375
- Index = 18
- Left = 7320
- TabIndex = 20
- Text = "Text1"
- Top = 3240
- Width = 1095
- End
- Begin VB.TextBox l_TextName
- Height = 375
- Index = 17
- Left = 7320
- TabIndex = 19
- Text = "Text1"
- Top = 2760
- Width = 1095
- End
- Begin VB.TextBox l_TextName
- Height = 375
- Index = 16
- Left = 7320
- TabIndex = 18
- Text = "Text1"
- Top = 2280
- Width = 1095
- End
- Begin VB.TextBox l_TextName
- Height = 375
- Index = 15
- Left = 6000
- TabIndex = 17
- Text = "Text1"
- Top = 3720
- Width = 1095
- End
- Begin VB.TextBox l_TextName
- Height = 375
- Index = 14
- Left = 6000
- TabIndex = 16
- Text = "Text1"
- Top = 3240
- Width = 1095
- End
- Begin VB.TextBox l_TextName
- Height = 375
- Index = 13
- Left = 6000
- TabIndex = 15
- Text = "Text1"
- Top = 2760
- Width = 1095
- End
- Begin VB.TextBox l_TextName
- Height = 375
- Index = 12
- Left = 6000
- TabIndex = 14
- Text = "Text1"
- Top = 2280
- Width = 1095
- End
- Begin VB.TextBox l_TextName
- Height = 375
- Index = 11
- Left = 4680
- TabIndex = 13
- Text = "Text1"
- Top = 3720
- Width = 1095
- End
- Begin VB.TextBox l_TextName
- Height = 375
- Index = 10
- Left = 4680
- TabIndex = 12
- Text = "Text1"
- Top = 3240
- Width = 1095
- End
- Begin VB.TextBox l_TextName
- Height = 375
- Index = 9
- Left = 4680
- TabIndex = 11
- Text = "Text1"
- Top = 2760
- Width = 1095
- End
- Begin VB.TextBox l_TextName
- Height = 375
- Index = 8
- Left = 4680
- TabIndex = 10
- Text = "Text1"
- Top = 2280
- Width = 1095
- End
- Begin VB.TextBox l_TextName
- Height = 375
- Index = 7
- Left = 3360
- TabIndex = 9
- Text = "Text1"
- Top = 3720
- Width = 1095
- End
- Begin VB.TextBox l_TextName
- Height = 375
- Index = 6
- Left = 3360
- TabIndex = 8
- Text = "Text1"
- Top = 3240
- Width = 1095
- End
- Begin VB.TextBox l_TextName
- Height = 375
- Index = 5
- Left = 3360
- TabIndex = 7
- Text = "Text1"
- Top = 2760
- Width = 1095
- End
- Begin VB.TextBox l_TextName
- Height = 375
- Index = 4
- Left = 3360
- TabIndex = 6
- Text = "Text1"
- Top = 2280
- Width = 1095
- End
- Begin VB.TextBox l_TextName
- Height = 375
- Index = 3
- Left = 2040
- TabIndex = 5
- Text = "Text1"
- Top = 3720
- Width = 1095
- End
- Begin VB.TextBox l_TextName
- Height = 375
- Index = 2
- Left = 2040
- TabIndex = 4
- Text = "Text1"
- Top = 3240
- Width = 1095
- End
- Begin VB.TextBox l_TextName
- Height = 375
- Index = 1
- Left = 2040
- TabIndex = 3
- Text = "Text1"
- Top = 2760
- Width = 1095
- End
- Begin VB.TextBox l_TextName
- Height = 375
- Index = 0
- Left = 2040
- TabIndex = 2
- Text = "Text1"
- Top = 2280
- Width = 1095
- End
- Begin VB.Label l_LabelPer
- Caption = "Label1"
- Height = 255
- Index = 21
- Left = 9600
- TabIndex = 41
- Top = 5520
- Width = 735
- End
- Begin VB.Label l_LabelPer
- Caption = "Label1"
- Height = 255
- Index = 20
- Left = 9600
- TabIndex = 40
- Top = 5280
- Width = 735
- End
- Begin VB.Label l_LabelPer
- Caption = "Label1"
- Height = 255
- Index = 19
- Left = 9600
- TabIndex = 39
- Top = 5040
- Width = 735
- End
- Begin VB.Label l_LabelPer
- Caption = "Label1"
- Height = 255
- Index = 18
- Left = 9600
- TabIndex = 38
- Top = 4800
- Width = 735
- End
- Begin VB.Label l_LabelPer
- Caption = "Label1"
- Height = 255
- Index = 17
- Left = 9120
- TabIndex = 37
- Top = 4320
- Width = 735
- End
- Begin VB.Label l_LabelPer
- Caption = "Label1"
- Height = 255
- Index = 16
- Left = 9120
- TabIndex = 36
- Top = 4080
- Width = 735
- End
- Begin VB.Label l_LabelPer
- Caption = "Label1"
- Height = 255
- Index = 15
- Left = 9120
- TabIndex = 35
- Top = 3840
- Width = 735
- End
- Begin VB.Label l_LabelPer
- Caption = "Label1"
- Height = 255
- Index = 14
- Left = 9120
- TabIndex = 34
- Top = 3600
- Width = 735
- End
- Begin VB.Label l_LabelPer
- Caption = "Label1"
- Height = 255
- Index = 13
- Left = 9120
- TabIndex = 33
- Top = 3360
- Width = 735
- End
- Begin VB.Label l_LabelPer
- Caption = "Label1"
- Height = 255
- Index = 12
- Left = 9120
- TabIndex = 32
- Top = 3120
- Width = 735
- End
- Begin VB.Label l_LabelPer
- Caption = "Label1"
- Height = 255
- Index = 11
- Left = 9120
- TabIndex = 31
- Top = 2880
- Width = 735
- End
- Begin VB.Label l_LabelPer
- Caption = "Label1"
- Height = 255
- Index = 10
- Left = 9120
- TabIndex = 30
- Top = 2640
- Width = 735
- End
- Begin VB.Label l_LabelPer
- Caption = "Label1"
- Height = 255
- Index = 9
- Left = 9240
- TabIndex = 29
- Top = 2280
- Width = 735
- End
- Begin VB.Label l_LabelPer
- Caption = "Label1"
- Height = 255
- Index = 8
- Left = 9240
- TabIndex = 28
- Top = 2040
- Width = 735
- End
- Begin VB.Label l_LabelPer
- Caption = "Label1"
- Height = 255
- Index = 7
- Left = 9240
- TabIndex = 27
- Top = 1800
- Width = 735
- End
- Begin VB.Label l_LabelPer
- Caption = "Label1"
- Height = 255
- Index = 6
- Left = 9240
- TabIndex = 26
- Top = 1560
- Width = 735
- End
- Begin VB.Label l_LabelPer
- Caption = "Label1"
- Height = 255
- Index = 5
- Left = 9240
- TabIndex = 25
- Top = 1200
- Width = 735
- End
- Begin VB.Label l_LabelPer
- Caption = "Label1"
- Height = 255
- Index = 4
- Left = 9240
- TabIndex = 24
- Top = 960
- Width = 735
- End
- Begin VB.Label l_LabelPer
- Caption = "Label1"
- Height = 255
- Index = 3
- Left = 9240
- TabIndex = 23
- Top = 720
- Width = 735
- End
- Begin VB.Label l_LabelPer
- Caption = "Label1"
- Height = 255
- Index = 2
- Left = 9240
- TabIndex = 22
- Top = 480
- Width = 735
- End
- Begin VB.Line l_LinePer
- Index = 3
- X1 = 1920
- X2 = 9600
- Y1 = 6480
- Y2 = 6480
- End
- Begin VB.Line l_LinePer
- Index = 2
- X1 = 1920
- X2 = 9600
- Y1 = 5880
- Y2 = 5880
- End
- Begin VB.Line l_LinePer
- Index = 1
- X1 = 1920
- X2 = 9600
- Y1 = 5280
- Y2 = 5280
- End
- Begin VB.Line l_LinePer
- Index = 0
- X1 = 1920
- X2 = 9600
- Y1 = 4680
- Y2 = 4680
- End
- Begin VB.Label l_LabelPer
- Caption = "Label1"
- Height = 255
- Index = 1
- Left = 2400
- TabIndex = 1
- Top = 1080
- Width = 735
- End
- Begin VB.Label l_LabelPer
- Caption = "Label1"
- Height = 255
- Index = 0
- Left = 4320
- TabIndex = 0
- Top = 720
- Width = 735
- End
- End
- Attribute VB_Name = "l_PersonForm"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Dim l_PersonsName(19) As String
- Private Sub Form_Load()
- Dim i As Integer
- Dim l_X1, l_X2, l_Y1, l_Y2 As Integer
- Const l_Top = 1000: Const l_Left = 1000
- Const l_DetaTop = 600: Const l_DetaLeft = 1500
- With Me
- .Caption = "总成试验台操作人员"
- .Height = 9000
- '.StartUpPosition = 3
- .Width = 12000
- End With
- With l_LinePer
- For i = 0 To .Count - 1 Step 1
- With l_LinePer(i)
- .BorderColor = RGB(0, 0, 0)
- Select Case i
- Case 0
- .X1 = l_Left
- .X2 = Me.Width - l_Left
- .Y1 = 1.4 * l_Top
- .Y2 = 1.4 * l_Top
- Case 1
- '.BorderColor = RGB(0, 0, 255)
- .X1 = l_Left
- .X2 = Me.Width - l_Left
- .Y1 = Me.Height - 3 * l_Top
- .Y2 = Me.Height - 3 * l_Top
- Case 2
- .X1 = l_Left
- .X2 = l_Left
- .Y1 = 1.4 * l_Top
- .Y2 = Me.Height - 3 * l_Top
- Case 3
- .X1 = Me.Width - 1 * l_Left
- .X2 = Me.Width - 1 * l_Left
- .Y1 = 1.4 * l_Top
- .Y2 = Me.Height - 3 * l_Top
- Case Else
- End Select
- End With
- Next i
- End With
- With l_LabelPer
- For i = 0 To .Count - 1 Step 1
- With l_LabelPer(i)
- .AutoSize = True
- .Font.Size = 15
- Select Case i
- Case 0
- .ForeColor = RGB(0, 0, 200)
- .Caption = "总成试验台 操作人员名单"
- .Left = Me.Width / 2 - 1400
- .Top = 500
- Case 1
- .Left = Me.Width / 2 - 2000
- .Top = 1000
- .Caption = "时间:" + Format$(Date$, "yyyy年mm月dd日") + " " + Format$(Time$, "hh:mm:ss")
- Case Else
- .Caption = i - 1
- .AutoSize = True
- .Alignment = 2
- .Font.Size = 13
- .Left = 2175 + Int((i - 2) / 4) * l_DetaLeft
- .Top = 2280 + (i - 2 - 4 * Int((i - 2) / 4)) * l_DetaTop
- End Select
- End With
- Next i
- End With
- With l_TimerPer
- .Interval = 250
- .Enabled = True
- End With
- Call l_ReadWritePer(True)
- With l_TextName
- For i = 0 To .Count - 1 Step 1
- With l_TextName(i)
- .Text = l_PersonsName(i)
- .Left = 2500 + Int(i / 4) * l_DetaLeft
- .Top = 2280 + (i - 4 * Int(i / 4)) * l_DetaTop
- End With
- Next i
- End With
- With l_CommandPer
- For i = 0 To .Count - 1 Step 1
- With l_CommandPer(i)
- .Top = 6680
- Select Case i
- Case 0
- .Caption = "读取"
- .Default = True
- Case 1
- .Caption = "保存"
- Case 2
- .Cancel = True
- .Caption = "退出"
- Case Else
- End Select
- End With
- Next i
- End With
- End Sub
- Private Sub l_CommandPer_Click(Index As Integer)
- Select Case Index
- Case 0
- Call l_ReadWritePer(True)
- MsgBox "名单读取完成", vbOKOnly, "读取名单提示"
- Case 1
- Call l_ReadWritePer(False)
- MsgBox "名单保存完成", vbOKOnly, "保存名单提示"
- Case 2
- Unload Me
- '返回调用者
- Case Else
- End Select
- End Sub
- Private Sub l_TimerPer_Timer()
- l_LabelPer(1).Caption = "时间:" + Format$(Date$, "yyyy年mm月dd日") + " " + Format$(Time$, "hh:mm:ss")
- End Sub
- Private Sub l_ReadWritePer(ByVal RW As Boolean)
- Dim i As Integer
- Select Case RW
- Case True
- Open "D:JL0708参数设定人员文件" For Binary As #4
- Get #4, 1, l_PersonsName
- Close #4
- With l_TextName
- For i = 0 To .Count - 1 Step 1
- With l_TextName(i)
- .Text = l_PersonsName(i)
- End With
- Next i
- End With
- Case False
- With l_TextName
- For i = 0 To .Count - 1 Step 1
- With l_TextName(i)
- l_PersonsName(i) = .Text
- End With
- Next i
- End With
- Open "D:JL0708参数设定人员文件" For Binary As #4
- Put #4, 1, l_PersonsName
- Close #4
- Case Else
- End Select
- End Sub