Posts

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           ...

Write a Vb.net program to design the following form, allow the user to select radio buttons from Gender and Age Panel. After Selection appropriate CheckBox from Right Panel should be selected automatically. Display appropriate message into the MessageBox by clicking on Ok button.

Image
slip no 13 Public Class Form1          Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click         If TextBox1.Text = "" Then             MessageBox.Show("Please Enter Name")         Else             Dim age As String             age = ""             If RadioButton3.Checked Then                 age = "Less Than 18. Can't Drive "             El...

Design a Vb.net form to pick a date from DateTimePicker Control and display day, month and year in separate text boxes

Slip9 Public Class Form1     Private Sub DateTimePicker1_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DateTimePicker1.ValueChanged         Dim d As DateTime         d = DateTimePicker1.Value         TextBox1.Text = d.Day         TextBox2.Text = d.Month         TextBox3.Text = d.Year     End Sub End Class

Write a Vb.net program to accept a character from keyboard and check whether it is vowel or not. Also display the case of that character.

Image
Slip10 Public Class Form1     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click         Dim ch As Char         ch = TextBox1.Text         Select Case ch             Case "A", "E", "I", "O", "U"                 MessageBox.Show(ch + " is Vowel And UpperCase")             Case "a", "e", "i", "o", "u"                 MessageBox.Show(ch + " is Vowel And LowerCase")          ...

Write a Vb.net program to design following screen, accept the details from the user. Clicking on Submit button Net Salary should be calculated and displayed into the TextBox. Display the MessageBox informing the Name and Net Salary of employee.

Image
Slip No 7 Public Class Form1     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click         Dim netsal As Double         netsal = Val(TextBox2.Text) + Val(TextBox3.Text) + Val(TextBox4.Text) + Val(TextBox5.Text) + Val(TextBox6.Text) + Val(TextBox7.Text) + Val(TextBox8.Text)         TextBox9.Text = netsal         MsgBox("Name : " & TextBox1.Text & vbNewLine & "Net Salary : " & netsal)     End Sub End Class  

Write a Vb.net program to accept number from user into the TextBox. Calculate the square root of that number also convert the entered number into binary number and display result into the Message Box

Image
slip no 8  Public Class Form1     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click         Dim n As Integer         Dim sqr As Double         Dim rm As Integer         Dim str1 As String         n = CInt(TextBox1.Text)         sqr = Math.Sqrt(n)         While n             rm = n Mod 2             str1 = str1 & rm             n ...