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

Visual Web Developer

http://www.microsoft.com/express/vwd/

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

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!

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

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

Thursday, March 19, 2009

Code for Lemonade Stand

Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim costOfCup As Decimal = 1.15
Dim largeCup As Decimal = 1.75
Dim totalCost As Decimal = 0.0
If CheckBox1.Checked = True Then
totalCost = largeCup * txtCups.Text
Else
totalCost = costOfCup * txtCups.Text
End If
lblPrice.Text = totalCost
End Sub
End Class

---
Give a description of what this code does:
....

Welcome Visual Basic Express Students!

For your first post I would like you to summarize the things you have learned so far...

Saturday, March 14, 2009

Please finish your Vehicle, Truck, and Car example

Your "homework" is to finish your Vehicle, Truck and Car example if you didn't in class.

Also read Chapter 11 in your book as we will be covering database connectivity in the next class.

Create a presentation using PowerPoint...

CLR, .NET Framework, History of Visual Basic, ASP .NET, C#, XML