VP PROS 1- 6
VP PROS 1- 6
Dim a, b, n As Single
Dim m As String
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles
Button1.Click
TextBox1.Text = TextBox1.Text & "1"
End Sub
End Sub
Private Sub Button14_Click(sender As Object, e As EventArgs) Handles
Button14.Click
a = Val(TextBox1.Text)
TextBox1.Text = ""
m = "-"
End Sub
End Sub
End Sub
Dim a, b, n, i, s As Integer
n = Val(TextBox1.Text)
a = 0
b = 1
s = 0
TextBox2.Text = a & "" & b & ""
For i = 2 To n – 1
s = a + b
TextBox2.Text = TextBox2.Text & s & ""
a = b
b = s
Next i
If n <= 0 Then
MsgBox("we cannot negative number")
End If
End Sub
TextBox1.Text = ""
TextBox2.Text = ""
End Sub
End
End Sub
End Class
Public Class Form1
Dim i, s, n As Integer
n = Val(TextBox1.Text)
For i = 1 To n
s = 0
s = s + i
TextBox2.Text = Val(TextBox2.Text) + s
Next i
End Sub
TextBox1.Text = ""
TextBox2.Text = ""
End Sub
End
End Sub
End Class
Public Class Form1
Dim i As Integer
Dim j As Integer
For i = 1 To 5
For j = 1 To i
Next j
Next i
MsgBox(pattern)
End Sub
Me.Text = ""
End
End Sub
End Class
OUTPUT FORM :
Public Class Form1
Form2.Show()
End Sub
Form3.Show()
End Sub
Form4.Show()
End Sub
End Class
OUTPUT FORM :
FORM :
Public Class Form1
End Sub
TextBox1.Text = ""
End Sub
Try
TextBox1.Text = content
Catch ex As Exception
MessageBox.Show("FILE ILLA")
End Try
End Sub
End
End Sub
End Class
OUTPUT FORM :
FORM DESIGN :
Imports System.IO
LoadSystemDrives()
End Sub
ListBox1.Items.Add(drive.Name)
Next
End Sub
Try
DisplayDirectoryContents()
Catch ex As Exception
ShowErrorMessage(ex.Message)
End Try
End Sub
ListBox2.Items.Clear()
ListBox2.Items.Add(Path.GetFileName(item))
Next
End Sub
If File.Exists(filePath) Then
Else
File.WriteAllText(filePath, TextBox1.Text)
End If
End If
End Sub
End Sub
End Sub
End Sub
End
End Sub
End Class
OUTPUT :
Public Class Form1
TextBox1.Text = System.IO.File.ReadAllText(openFileDialog1.FileName)
End If
End Sub
System.IO.File.WriteAllText(saveFileDialog1.FileName,TextBox1.Text)
End If
End Sub
TextBox1.Text = ""
End Sub
End
End Sub
End Class
FORM DESIGN :
OUTPUT :