📄 form1.vb
字号:
Me.txt13.Name = "txt13"
Me.txt13.Size = New System.Drawing.Size(48, 22)
Me.txt13.TabIndex = 7
Me.txt13.Text = "0"
'
'txt20
'
Me.txt20.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
Me.txt20.Location = New System.Drawing.Point(106, 97)
Me.txt20.Name = "txt20"
Me.txt20.Size = New System.Drawing.Size(48, 22)
Me.txt20.TabIndex = 8
Me.txt20.Text = "0"
'
'txt01
'
Me.txt01.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
Me.txt01.Location = New System.Drawing.Point(173, 37)
Me.txt01.Name = "txt01"
Me.txt01.Size = New System.Drawing.Size(48, 22)
Me.txt01.TabIndex = 1
Me.txt01.Text = "0"
'
'txt00
'
Me.txt00.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
Me.txt00.Location = New System.Drawing.Point(106, 37)
Me.txt00.Name = "txt00"
Me.txt00.Size = New System.Drawing.Size(48, 22)
Me.txt00.TabIndex = 0
Me.txt00.Text = "0"
'
'txt21
'
Me.txt21.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
Me.txt21.Location = New System.Drawing.Point(173, 97)
Me.txt21.Name = "txt21"
Me.txt21.Size = New System.Drawing.Size(48, 22)
Me.txt21.TabIndex = 9
Me.txt21.Text = "0"
'
'lblSum
'
Me.lblSum.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
Me.lblSum.Location = New System.Drawing.Point(374, 15)
Me.lblSum.Name = "lblSum"
Me.lblSum.Size = New System.Drawing.Size(58, 15)
Me.lblSum.TabIndex = 0
Me.lblSum.Text = "小计"
'
'txt03
'
Me.txt03.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
Me.txt03.Location = New System.Drawing.Point(307, 37)
Me.txt03.Name = "txt03"
Me.txt03.Size = New System.Drawing.Size(48, 22)
Me.txt03.TabIndex = 3
Me.txt03.Text = "0"
'
'btnCal
'
Me.btnCal.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
Me.btnCal.Location = New System.Drawing.Point(336, 134)
Me.btnCal.Name = "btnCal"
Me.btnCal.Size = New System.Drawing.Size(77, 23)
Me.btnCal.TabIndex = 12
Me.btnCal.Text = "计算"
'
'lblC2
'
Me.lblC2.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
Me.lblC2.Location = New System.Drawing.Point(240, 15)
Me.lblC2.Name = "lblC2"
Me.lblC2.Size = New System.Drawing.Size(58, 15)
Me.lblC2.TabIndex = 0
Me.lblC2.Text = "第三处"
'
'lblC1
'
Me.lblC1.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
Me.lblC1.Location = New System.Drawing.Point(173, 15)
Me.lblC1.Name = "lblC1"
Me.lblC1.Size = New System.Drawing.Size(57, 15)
Me.lblC1.TabIndex = 0
Me.lblC1.Text = "第二处"
'
'lblTot
'
Me.lblTot.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
Me.lblTot.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
Me.lblTot.Location = New System.Drawing.Point(106, 134)
Me.lblTot.Name = "lblTot"
Me.lblTot.Size = New System.Drawing.Size(48, 23)
Me.lblTot.TabIndex = 4
'
'lblC0
'
Me.lblC0.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
Me.lblC0.Location = New System.Drawing.Point(106, 15)
Me.lblC0.Name = "lblC0"
Me.lblC0.Size = New System.Drawing.Size(57, 15)
Me.lblC0.TabIndex = 0
Me.lblC0.Text = "第一处"
'
'lblR2
'
Me.lblR2.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
Me.lblR2.Location = New System.Drawing.Point(10, 97)
Me.lblR2.Name = "lblR2"
Me.lblR2.Size = New System.Drawing.Size(86, 15)
Me.lblR2.TabIndex = 0
Me.lblR2.Text = "广州分公司"
'
'lblR0
'
Me.lblR0.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
Me.lblR0.Location = New System.Drawing.Point(10, 37)
Me.lblR0.Name = "lblR0"
Me.lblR0.Size = New System.Drawing.Size(86, 15)
Me.lblR0.TabIndex = 0
Me.lblR0.Text = "北京分公司"
'
'lblR1
'
Me.lblR1.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
Me.lblR1.Location = New System.Drawing.Point(10, 67)
Me.lblR1.Name = "lblR1"
Me.lblR1.Size = New System.Drawing.Size(86, 15)
Me.lblR1.TabIndex = 0
Me.lblR1.Text = "上海分公司"
'
'Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)
Me.ClientSize = New System.Drawing.Size(432, 161)
Me.Controls.Add(Me.btnCal)
Me.Controls.Add(Me.lblT)
Me.Controls.Add(Me.lblTot)
Me.Controls.Add(Me.lblS2)
Me.Controls.Add(Me.lblS1)
Me.Controls.Add(Me.lblS0)
Me.Controls.Add(Me.txt23)
Me.Controls.Add(Me.txt03)
Me.Controls.Add(Me.txt13)
Me.Controls.Add(Me.lblC3)
Me.Controls.Add(Me.lblSum)
Me.Controls.Add(Me.lblC2)
Me.Controls.Add(Me.lblC1)
Me.Controls.Add(Me.lblC0)
Me.Controls.Add(Me.txt12)
Me.Controls.Add(Me.txt02)
Me.Controls.Add(Me.txt22)
Me.Controls.Add(Me.txt11)
Me.Controls.Add(Me.txt01)
Me.Controls.Add(Me.txt21)
Me.Controls.Add(Me.txt20)
Me.Controls.Add(Me.lblR2)
Me.Controls.Add(Me.txt10)
Me.Controls.Add(Me.lblR1)
Me.Controls.Add(Me.txt00)
Me.Controls.Add(Me.lblR0)
Me.Name = "Form1"
Me.Text = "f10_2_1"
Me.ResumeLayout(False)
End Sub
#End Region
'************* f10_2_1 **************
Private Sub btnCal_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnCal.Click
Dim amt(2, 3), sum(2), total As Integer
Dim i, j As Integer
amt(0, 0) = txt00.Text : amt(0, 1) = txt01.Text
amt(0, 2) = txt02.Text : amt(0, 3) = txt03.Text
amt(1, 0) = txt10.Text : amt(1, 1) = txt11.Text
amt(1, 2) = txt12.Text : amt(1, 3) = txt13.Text
amt(2, 0) = txt20.Text : amt(2, 1) = txt21.Text
amt(2, 2) = txt22.Text : amt(2, 3) = txt23.Text
For i = 0 To 2
For j = 0 To 3
sum(i) += amt(i, j)
Next j
total += sum(i)
Next i
lblS0.Text = sum(0) : lblS1.Text = sum(1)
lblS2.Text = sum(2) : lblTot.Text = total
End Sub
End Class
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -