2010 12 27 2提
2010 12 27 2提
Public Class Form1
Public Structure candystru
Dim sno As String
Dim sname As String
Dim sprice As Integer
End Structure
Private Sub form1_load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
End Sub
Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim candy(10) As candystru
Dim str1 = ""
candy(1).sno = "A001"
candy(1).sname = "巧克力"
candy(1).sprice = 100
candy(2).sno = "A002"
candy(2).sname = "牛奶糖"
candy(2).sprice = 30
candy(0).sno = "A002"
candy(0).sname = "口香糖"
candy(0).sprice = 20
For i = 0 To 2
str1 = str1 & candy(i).sno & vbNewLine
str1 &= candy(i).sname & vbNewLine
str1 &= candy(i).sprice & vbNewLine
Next
TextBox1.Text = str1
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Me.Close()
End Sub
End Class
Public Structure candystru
Dim sno As String
Dim sname As String
Dim sprice As Integer
End Structure
Private Sub form1_load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
End Sub
Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim candy(10) As candystru
Dim str1 = ""
candy(1).sno = "A001"
candy(1).sname = "巧克力"
candy(1).sprice = 100
candy(2).sno = "A002"
candy(2).sname = "牛奶糖"
candy(2).sprice = 30
candy(0).sno = "A002"
candy(0).sname = "口香糖"
candy(0).sprice = 20
For i = 0 To 2
str1 = str1 & candy(i).sno & vbNewLine
str1 &= candy(i).sname & vbNewLine
str1 &= candy(i).sprice & vbNewLine
Next
TextBox1.Text = str1
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Me.Close()
End Sub
End Class
這個論壇的權限:
您 無法 在這個版面回復文章