Tuesday, September 7, 2010

Tuesday, September 7 2010

alright I am going to do a tutorial by Michael Halvorson that involves importing pictures.


Dim i As Integer
For i = 1 To 3
pctTulsaWindow.Image = System.Drawing.Image.FromFile _
("C:\Users\Alfred\Downloads\touroftulsaprogram\tulsa" & i & ".jpg")
MsgBox("click here for next face.")
Next


Following the tutorial I further modified it as


pctTulsaWindow.Image = System.Drawing.Image.FromFile("C:\Users\Alfred\Downloads\touroftulsaprogram\tulsa" & Counter & ".jpg")

Counter += 1
If Counter = 5 Then
Counter = 1
System.Console.Beep(200, 200)
End If


The next tutorial is for converting farenheit to Celsius.



Dim FTemp, Celsius As Single
Dim strFTemp As String
Dim prompt As String = "Enter a Fahrenheit temperature."
Do
strFTemp = InputBox(prompt, "Fahrenheit to Celsius")
If strFTemp <> "" Then
FTemp = CSng(strFTemp)
Celsius = Int((FTemp + 40) * 5 / 9 - 40)
MsgBox(Celsius, , "Temperature in Celsius")
End If
Loop While strFTemp <> ""

No comments: