Saturday, April 4, 2009
Saturday, March 28, 2009
Project Discussion / Database review next Saturday!
If you are interested in one last class, we can meet here next Saturday at 2pm to discuss projects you are working on and database connectivity! Email me if you are interested:
david.freer@gmail.com
david.freer@gmail.com
Thursday, March 26, 2009
In class assignment :)
Keep track of
1. The number of hotdogs
2. The number of drinks
3. How many hotdogs sold
4. How many drinks sold
5. Total Revenue, Total Profit
6. Allow the cart to get more hotdogs and more drinks
7. Create your program so it has a pleasing look
1. The number of hotdogs
2. The number of drinks
3. How many hotdogs sold
4. How many drinks sold
5. Total Revenue, Total Profit
6. Allow the cart to get more hotdogs and more drinks
7. Create your program so it has a pleasing look
Tuesday, March 24, 2009
Sum up the skills we learned today (Visual Basic Express!)
On your blog, recap what we have done today!
For "homework" design a simple screen for a bicycle store. Allow the users to get info about bikes!
For "homework" design a simple screen for a bicycle store. Allow the users to get info about bikes!
catching errors!
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim result As Integer
Dim num1, num2 As Integer
'storage!
Try
num1 = txtNum1.Text
Catch ex As Exception
MsgBox("You have to enter a number!")
txtNum1.Text = ""
txtNum1.Focus() 'bring back the user to the location
End Try
Try
num2 = txtNum2.Text
Catch ex As Exception
MsgBox("You have to enter a number!")
txtNum2.Text = ""
txtNum2.Focus()
End Try
'convert String into Integer
result = num1 + num2
'calculation!
'input within the textboxes!
lblResult.Text = result
'output with the label!
End Sub
End Class
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim result As Integer
Dim num1, num2 As Integer
'storage!
Try
num1 = txtNum1.Text
Catch ex As Exception
MsgBox("You have to enter a number!")
txtNum1.Text = ""
txtNum1.Focus() 'bring back the user to the location
End Try
Try
num2 = txtNum2.Text
Catch ex As Exception
MsgBox("You have to enter a number!")
txtNum2.Text = ""
txtNum2.Focus()
End Try
'convert String into Integer
result = num1 + num2
'calculation!
'input within the textboxes!
lblResult.Text = result
'output with the label!
End Sub
End Class
Code from today
Public Class Form1
Dim foodInfo(4) As String
'Cakes
'Bread
'Meat
'Seafood
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
foodInfo(0) = "Cakes at Publix are the highest quality!"
foodInfo(1) = "All the bread at Publix is fresh"
foodInfo(2) = "Publix meat is the best in the world"
foodInfo(3) = "Our seafood !! is caught freshly every day!"
If ComboBox1.Text = "Cakes" Then
'output info to lblInfo
lblInfo.Text = foodInfo(0)
ElseIf ComboBox1.Text = "Bread" Then
PictureBox1.ImageLocation = "http://upload.wikimedia.org/wikipedia/commons/1/1f/FD_1.jpg"
'PictureBox1.Visible = False
'PictureBox2.Visible = True
lblInfo.Text = foodInfo(1)
ElseIf ComboBox1.Text = "Meat" Then
lblInfo.Text = foodInfo(2)
ElseIf ComboBox1.Text = "Seafood" Then
lblInfo.Text = foodInfo(3)
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
foodInfo(0) = "Cakes at Publix are the highest quality!"
foodInfo(1) = "All the bread at Publix is fresh"
foodInfo(2) = "Publix meat is the best in the world"
foodInfo(3) = "Our seafood !! is caught freshly every day!"
If txtProduct.Text = "Cake" Then
lblInfo.Text = foodInfo(0)
ElseIf txtProduct.Text = "Bread" Then
lblInfo.Text = foodInfo(1)
End If
End Sub
End Class
Dim foodInfo(4) As String
'Cakes
'Bread
'Meat
'Seafood
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
foodInfo(0) = "Cakes at Publix are the highest quality!"
foodInfo(1) = "All the bread at Publix is fresh"
foodInfo(2) = "Publix meat is the best in the world"
foodInfo(3) = "Our seafood !! is caught freshly every day!"
If ComboBox1.Text = "Cakes" Then
'output info to lblInfo
lblInfo.Text = foodInfo(0)
ElseIf ComboBox1.Text = "Bread" Then
PictureBox1.ImageLocation = "http://upload.wikimedia.org/wikipedia/commons/1/1f/FD_1.jpg"
'PictureBox1.Visible = False
'PictureBox2.Visible = True
lblInfo.Text = foodInfo(1)
ElseIf ComboBox1.Text = "Meat" Then
lblInfo.Text = foodInfo(2)
ElseIf ComboBox1.Text = "Seafood" Then
lblInfo.Text = foodInfo(3)
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
foodInfo(0) = "Cakes at Publix are the highest quality!"
foodInfo(1) = "All the bread at Publix is fresh"
foodInfo(2) = "Publix meat is the best in the world"
foodInfo(3) = "Our seafood !! is caught freshly every day!"
If txtProduct.Text = "Cake" Then
lblInfo.Text = foodInfo(0)
ElseIf txtProduct.Text = "Bread" Then
lblInfo.Text = foodInfo(1)
End If
End Sub
End Class
Subscribe to:
Posts (Atom)
