Posts

Showing posts from October, 2015

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

Write a Vb.net program to add two TextBoxes, two Labels and one button at runtime. Accept two numbers in textboxes and handle DivideByZeroException.

Image
slip No 6 Public Class Form1     Dim t1, t2 As New TextBox     Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load         Controls.Add(t1)         Controls.Add(t2)                  t1.Left = 200         t1.Top = 50         t2.Left = 200         t2.Top = 100     End Sub     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click         Dim ans, n1, n2 ...

Write a Vb.net program to accept a number from an user through InputBox and display its multiplication table into the ListBox.

Image
Slip No 4 Public Class Form1     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click         ListBox1.Items.Clear()         Dim n As Integer         Dim i As Integer         n = InputBox("Enter Number to create table")         For i = 1 To 10             ListBox1.Items.Add(i * n)         Next     End Sub End Class

Write a Vb.Net program to move the Text “Dr D Y Patil College” continuously from Left to       Right.

Image
  Slip No 3 Public Class Form1     Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick         If Label1.Left >= Me.Width Then             Label1.Left = -100         Else             Label1.Left = Label1.Left + 10         End If     End Sub End Class

Write a Vb.net program for blinking an image.

Image
Slip No 2 Public Class Form1     Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick         If PictureBox1.Visible = Visible Then             PictureBox1.Visible = False         Else             PictureBox1.Visible = True         End If     End Sub End Class

Write a Vb.net program to check whether entered string is palindrome or not.

Image
Slip No 1 Public Class Form1     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click         Dim s As String         Dim r As String         s = TextBox1.Text         r = StrReverse(s)         If s = r Then             MessageBox.Show("Enterd String is Palindrome")         Else             MessageBox.Show("Enterd String is Not Palindrome")         End If     End Sub End Class