0% found this document useful (0 votes)
40 views5 pages

Assignment #2 IS 350 - Simkin Jennifer Truong

The document contains code snippets for a Visual Basic .NET Windows Forms application with multiple problems labeled with numbers demonstrating different form controls and events. It shows how to change form properties like background color and text on buttons clicks and textbox entries. The code snippets demonstrate concepts like enabling and disabling textboxes, clearing and transferring text between textboxes on entry events.

Uploaded by

Jennifer Truong
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)
40 views5 pages

Assignment #2 IS 350 - Simkin Jennifer Truong

The document contains code snippets for a Visual Basic .NET Windows Forms application with multiple problems labeled with numbers demonstrating different form controls and events. It shows how to change form properties like background color and text on buttons clicks and textbox entries. The code snippets demonstrate concepts like enabling and disabling textboxes, clearing and transferring text between textboxes on entry events.

Uploaded by

Jennifer Truong
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/ 5

Assignment #2

IS 350 Simkin
Jennifer Truong

Problem Points Possible Presenter


22
24
32
38
42
40
44
Cruise #1

Total Points
#22

Public Class Form1


Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Me.Text = "Hello World!"
End Sub

#24

'lblName
'
Me.lblName.AutoSize = True
Me.lblName.ForeColor = Color.Red
Me.lblName.Location = New System.Drawing.Point(0, 0)
Me.lblName.Name = "lblName"
Me.lblName.Size = New System.Drawing.Size(39, 13)
Me.lblName.TabIndex = 0
Me.lblName.Text = "Label1"

#32
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Me.BackColor = Color.Wheat
Me.lblName.ForeColor = Color.LightSeaGreen
Me.lblName.Text = "Hello, how are you?"

#38

Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click


Me.TextBox1.Enabled() = True
Me.TextBox1.Focus()
End Sub

Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click


Me.TextBox1.Enabled() = False
End Sub

#42
Private Sub TextBox2_Enter(sender As Object, e As EventArgs) Handles TextBox2.Enter
Me.Label1.Text = "Enter your full name."
End Sub

Private Sub TextBox3_Enter(sner As Object, e As EventArgs) Handles TextBox3.Enter


Me.Label1.Text = "Enter your phone number, including area code."
End Sub

#40

Public Class Form1

Private Sub TextBox3_enter(sender As Object, e As EventArgs) Handles TextBox3.Enter


TextBox3.BackColor = Color.Red
TextBox2.BackColor = Color.DarkGray
TextBox1.BackColor = Color.DarkGray
End Sub
Private Sub TextBox2_enter(sender As Object, e As EventArgs) Handles TextBox2.Enter
TextBox3.BackColor = Color.DarkGray
TextBox2.BackColor = Color.Yellow
TextBox1.BackColor = Color.DarkGray
End Sub

Private Sub TextBox1_enter(sender As Object, e As EventArgs) Handles TextBox1.Enter


TextBox3.BackColor = Color.DarkGray
TextBox2.BackColor = Color.DarkGray
TextBox1.BackColor = Color.Green
End Sub
End Class

#44
Public Class Form1
Private Sub TextBox1_enter(sender As Object, e As EventArgs) Handles TextBox1.Enter
Me.TextBox1.Text = TextBox2.Text
Me.TextBox2.Clear()

End Sub

Private Sub TextBox2_enter(sender As Object, e As EventArgs) Handles TextBox2.Enter


Me.TextBox2.Text = TextBox1.Text
Me.TextBox1.Clear()
End Sub
End Class

You might also like