Posts

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