Advertisement
Advertisement
| 03.10.2008 at 07:42PM PDT, ID: 23230654 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: |
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim sw As New System.IO.StreamWriter("c:\MycomboboxItems.txt", True)
Dim AddItem As String
AddItem = TextBox1.Text
ComboBox1.Items.Add(AddItem)
sw.WriteLine(AddItem)
If TextBox1.Text & TextBox2.Text = "" Then
MsgBox("Please Input Name or Serial Number !")
Else
MsgBox("Created Sucessfully")
sw.Close()
End If
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim sr As New System.IO.StreamReader("c:\MycomboboxItems.txt")
Do While sr.Peek() >= 0
ComboBox1.Items.Add(sr.ReadLine)
Loop
sr.Close()
End Sub
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
End
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Form2.Show()
Me.Hide()
End Sub
End Class
|