Dim total, goal, months, pay, years As Integer months = 0 pay = 25 months += 1 total += pay 'adds pay CInt(txtMonthyIncome.Text)
Do While total < 10000
LooplblYears.Text = (months / 12).ToString ' loops months so that a counnter is kept
Dim total, goal, months, pay, years As Integer months = 0 pay = 25 months += 1 total += pay 'adds pay CInt(txtMonthyIncome.Text)
For Each singleChar In siteName
Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim shirt, pants, shoes As String shirt = "shirt" pants = "pants" shoes = "shoes" Me.Close() End Sub ClassMe.lstTotalItems.Items.Add(shirt)Me.lstTotalItems.Items.Add(pants)Me.lstTotalItems.Items.Add(shoes)Me.lstTotalItems.ScrollAlwaysVisible = TrueEnd Sub lstTotalItems.SelectedItem = Private Sub btnItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnItem1.Click"shirt"End Sub lstTotalItems.SelectedItem = Private Sub btnItem2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnItem2.Click"pants"End Sub lstTotalItems.SelectedItem = Private Sub btnItem3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnItem3.Click"shoes"End Sub EndPrivate Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim shirt, pants, shoes As String
Shirt = "shirt"
pants = "pants"
shoes = "shoes"
Me.lstTotalItems.Items.Add(shirt)
Me.lstTotalItems.Items.Add(pants)
Me.lstTotalItems.Items.Add(shoes)
Me.lstTotalItems.ScrollAlwaysVisible = True
End Sub
Private Sub btnItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnItem1.Click
lstTotalItems.SelectedItem = "shirt"
End Sub
Private Sub btnItem2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnItem2.Click
lstTotalItems.SelectedItem = "pants"
End Sub
Private Sub btnItem3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnItem3.Click
lstTotalItems.SelectedItem = "shoes"
End Sub
Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click
Me.Close()
End Sub
End Class
Public Class Form1
Dim lbl1, lbl2, lbl3 As New Label
Dim WithEvents txt1, txt2, txt3 As New TextBox
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
lbl1.Text = "Hello"
lbl1.Location = New Point(8, 163)
lbl2.AutoSize = true
Me.Controls.Add(lbl1)
lbl2.Text = "Press the reset button"
lbl2.Location = (123, 5)
lbl3.AutoSize = true
Me.Controls.Add(lbl2)
lbl3.Text = "Live life "
lbl3.Location = New Point(5, 236)True
txt1.Location =New Point(1, 6)
txt1.Name ="txt1"
Me.Controls.Add(lbl3)
Me.Controls.Add(txt1)"
txt2.Location =New Point(65, 6)
txt2.Name =)"txt2"
txt3.Location = New Point(124, 240)
txt3.Name ="txt3"
Me.Controls.Add(txt2)
New Point(54, 166)
Me.Controls.Add(txt3)
End Sub
End Class
Public Class Form1
Private Sub btnBackGroundColor_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBackgroundColor.Click
'This changes the text colors back and forth between tomato and white
If txtOutputbox.BackColor = Color.White Then
txtOutputbox.BackColor = Color.Tomato
Else
txtOutputbox.BackColor = Color.White
End If
End Sub
Private Sub button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
'Enables the textbox
If txtOutputbox.Enabled = False Then
txtOutputbox.Enabled = True
Else
txtOutputbox.Enabled = False
End If
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
'This one it the same as the two above.
If txtOutputbox.BorderStyle = BorderStyle.Fixed3D Then
txtOutputbox.BorderStyle = BorderStyle.None
Else
txtOutputbox.BorderStyle = BorderStyle.Fixed3D
End If
End Sub
Private Sub btnText_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnText.Click
If txtOutputbox.Text = "If heaven was a mile away" Then
txtOutputbox.Text = " "
Else
txtOutputbox.Text = "If heaven was a mile away"
End If
End Sub
End Class