0% found this document useful (0 votes)
117 views

Designer View: 'Project: Lab 1 - Hello World 'Programmer: 'Date

This document describes a Visual Basic .NET lab exercise involving designing a user interface with labels, text boxes, and buttons. The interface includes an "Hello World" label, text box, and "Display" button to populate the text box, along with "Visible" and "Invisible" buttons to toggle a "Visual Basic .NET" label. The code defines event handler subroutines for each button to perform the corresponding action.

Uploaded by

Ting Hong Hong
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
117 views

Designer View: 'Project: Lab 1 - Hello World 'Programmer: 'Date

This document describes a Visual Basic .NET lab exercise involving designing a user interface with labels, text boxes, and buttons. The interface includes an "Hello World" label, text box, and "Display" button to populate the text box, along with "Visible" and "Invisible" buttons to toggle a "Visual Basic .NET" label. The code defines event handler subroutines for each button to perform the corresponding action.

Uploaded by

Ting Hong Hong
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

CSC1180

Lab Exercise 1 – Visual Basic .NET Environment and User Interface Design

Designer View

Name = frmMain
Text = Hello World

Name = lblSlogan
Text = Visual Basic .NET

Name = txtHelloWorld
Name = btnDisplay Text = blank
Text = Display
Name = btnInvisible
Text = Invisible
Name = btnExit Name = btnVisible
Text = Exit Text = Visible

Code View

'Project: Lab 1 – Hello World


'Programmer: <your name>
'Date: <today's date>

Public Class frmHelloWorld


Private Sub btnExit_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles btnExit.Click
Me.Close()
End Sub

Private Sub btnDisplay_Click(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles btnDisplay.Click
Me.txtHelloWorld.Text = "Hello World"
End Sub

Private Sub btnVisible_Click(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles btnVisible.Click
Me.lblSlogan.Visible = True
End Sub

Private Sub btnInvisible_Click(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles btnInvisible.Click
Me.lblSlogan.Visible = False
End Sub
End Class

Page 1 of 1

You might also like