0% found this document useful (0 votes)
6 views7 pages

Database

The document contains code snippets demonstrating the use of Visual Studio for creating simple applications in VB.NET. It includes examples of user input handling, generating random numbers, and checking if a number is even or odd. Additionally, there is a module that prints a pattern to the console.

Uploaded by

bamharenyasha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views7 pages

Database

The document contains code snippets demonstrating the use of Visual Studio for creating simple applications in VB.NET. It includes examples of user input handling, generating random numbers, and checking if a number is even or odd. Additionally, there is a module that prints a pattern to the console.

Uploaded by

bamharenyasha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Name: Nyasha Bamhare

Candidate number:
Center number:
1.
Used visual studio

Public Class Form1

Private Sub btnenter_Click(sender As Object, e As EventArgs) Handles


btnenter.Click
Dim man As String
man = txtnam.text
MessageBox.Show("Hello " & man)

End Sub
End Class
2.Used visual studio

Public Class Form1

Private Sub txt1_TextChanged(sender As Object, e As EventArgs) Handles


txt1.TextChanged

End Sub

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles


Button1.Click
Dim ran As New Random()
Dim randomnumber As Integer = ran.Next(1, 7)
txt1.Text = randomnumber
End Sub
End Class
3.

Imports System.Console
Module Module1

Sub Main()

WriteLine("# # # # #")
WriteLine("# # # # #")
WriteLine("# # # # #")
WriteLine("# # # # #")

On Error Resume Next


ReadLine()
End Sub

End Module
4.use visual studio

Public Class Form1

Private Sub btn1_Click(sender As Object, e As EventArgs) Handles


btn1.Click
Dim num As Integer = txtnum.Text
If num Mod 2 = 0 Then MsgBox("num is Even") Else
Return
MsgBox("num is Odd")

End Sub
End Class
5.
6.Microsoft Access
a.

b.

You might also like