Posts

Showing posts with the label Vb.net Program

Write a Vb.net program to design the following form, select the question number from combo box that question will be displayed into textbox and the options for that question will be displayed on four radio buttons, select option and click on submit button result should be displayed in another textbox.

Image
SLip No. 14 Public Class Form1     Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged         If ComboBox1.SelectedItem() = "Question 1" Then             RichTextBox1.Text = "What is Capital Of India ?"             RadioButton1.Text = "Delhi"             RadioButton2.Text = "Pune"             RadioButton3.Text = "Mumbai"             RadioButton4.Text = "Chennai"         End If        ...

Write a Vb.net program to accept sentences in text box and count the number of words and display the count in message box.

Image
Slip No 11 Public Class Form1     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click         Dim sentence As String         Dim i As Integer         Dim wc As Integer         sentence = TextBox1.Text         Dim arr() As Char = sentence.ToCharArray         For i = 0 To arr.Length - 1             If arr(i) = " " Then                 wc = wc + 1           ...