Public all_details As String
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim name As String
name = InputBox("Enter City Name :")
ComboBox3.Items.Add(name)
ComboBox3.Sorted = True
ComboBox3.SelectedItem = name
End Sub
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
TextBox2.ReadOnly = True
TextBox7.Visible = False
TextBox4.ReadOnly = True
ComboBox1.Items.Add("Gujarat")
ComboBox1.Items.Add("Rajeshthan")
ComboBox1.Items.Add("Punjab")
End Sub
Private Sub RadioButton1_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton1.CheckedChanged
If RadioButton1.Checked = True Then
RadioButton2.Checked = False
ComboBox4.DropDownStyle = ComboBoxStyle.DropDown
ComboBox6.DropDownStyle = ComboBoxStyle.DropDown
ComboBox5.DropDownStyle = ComboBoxStyle.DropDown
End If
End Sub
Private Sub RadioButton2_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton2.CheckedChanged
If RadioButton2.Checked = True Then
RadioButton1.Checked = False
ComboBox4.DropDownStyle = ComboBoxStyle.DropDownList
ComboBox6.DropDownStyle = ComboBoxStyle.DropDownList
ComboBox5.DropDownStyle = ComboBoxStyle.DropDownList
End If
End Sub
Private Sub CheckedListBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles CheckedListBox1.SelectedIndexChanged
Dim i As Object
For Each i In CheckedListBox1.SelectedItems
TextBox7.Text += i & vbNewLine
Next
End Sub
Private Sub ComboBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox1.SelectedIndexChanged
If ComboBox1.SelectedItem = "Gujarat" Then
ComboBox2.Items.Clear()
ComboBox2.Items.Add("Kutch")
ComboBox2.Items.Add("Surat")
ComboBox2.Items.Add("Ahemdabad")
ElseIf ComboBox1.SelectedItem = "Punjab" Then
ComboBox2.Items.Clear()
ComboBox2.Items.Add("Punjab1")
ComboBox2.Items.Add("Punjab2")
ComboBox2.Items.Add("Punjab3")
ElseIf ComboBox1.SelectedItem = "Rajeshthan" Then
ComboBox2.Items.Clear()
ComboBox2.Items.Add("Jaypur")
ComboBox2.Items.Add("Barmed")
ComboBox2.Items.Add("Sanchor")
End If
End Sub
Private Sub ComboBox2_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox2.SelectedIndexChanged
If ComboBox2.SelectedItem = "Kutch" Then
ComboBox3.Items.Clear()
ComboBox3.Items.Add("Bhuj")
ComboBox3.Items.Add("Madvi")
ComboBox3.Items.Add("Mundra")
ElseIf ComboBox2.SelectedItem = "Punjab2" Then
ComboBox3.Items.Clear()
ComboBox3.Items.Add("Bhuj2")
ComboBox3.Items.Add("Madvi3")
ComboBox3.Items.Add("Mundra4")
ElseIf ComboBox2.SelectedItem = "Surat" Then
ComboBox3.Items.Clear()
ComboBox3.Items.Add("Bhuj50")
ComboBox3.Items.Add("Madvi60")
ComboBox3.Items.Add("Mundra70")
End If
End Sub
Private Sub ComboBox3_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox3.SelectedIndexChanged
If ComboBox3.SelectedItem = "Bhuj" Then
TextBox4.Text = "370420"
ElseIf ComboBox3.SelectedItem = "Surat" Then
TextBox4.Text = "370452"
ElseIf ComboBox3.SelectedItem = "Ahemdabad" Then
TextBox4.Text = "370400"
End If
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
TextBox6.Clear()
TextBox6.Text += "Brand :" & ComboBox4.Text & vbNewLine
TextBox6.Text += "Processor :" & ComboBox5.Text & vbNewLine
TextBox6.Text += "RAM :" & ComboBox6.Text & vbNewLine
TextBox6.Text += "Hard Disk :" & ComboBox7.Text & vbNewLine
TextBox6.Text += "Extra :" & TextBox7.Text & vbNewLine
End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
all_details = TextBox6.Text
TextBox7.Clear()
TextBox7.Text += "Cust Name :" & TextBox1.Text & vbNewLine
TextBox7.Text += "Cust ID :" & TextBox2.Text & vbNewLine
TextBox7.Text += "Cust Add :" & TextBox3.Text & vbNewLine
TextBox7.Text += "Cust State :" & ComboBox1.Text & vbNewLine
TextBox7.Text += "Cust District :" & ComboBox2.Text & vbNewLine
TextBox7.Text += "Cust City :" & ComboBox3.Text & vbNewLine
TextBox7.Text += "Cust PIN :" & TextBox4.Text & vbNewLine
TextBox7.Text += "Cust State :" & TextBox5.Text & vbNewLine
all_details += TextBox7.Text
confi2.Show()
End Sub
End Class
No comments:
Post a Comment