Tuesday, March 07, 2006

'Dim Jian as scribe 'can only find that in VB 2000.6 and the VB u using now is VB 6.0?



Dim
Sum as Chinese Food 'good to eat
Dim Thang, Indrew as string ' already did scribe this cycle
Dim NEXTSCRIBE as string
Const ERROR = "He has already did scribe yo. Pick someone else"

inputbox ("enter the name you wish to be next scribe")

inputbox = Next scribe + next scribe
'oh dear, i dont even know if that is
'how you store the name.
if NextScribe = Thang, Indrew then

msg ERROR
end if


Form Load

'Today was once again those days i feel out of place.
'I don't know if i should copy the codes or lesson to the teacher. I end up copying so i kind of have 'no idea what happen today.

'any ways today we learn about motion
'making a picture of our choice enlarge, reduce, move up move down. ' i think hahaha. like i 'said earlier i was too busy copying.
'also make it stop and go back to the starting point, and one more thing and is to make it go 'random places i anywhere in the form

'all those options are use in a menu
'heres something we did today yo!

Const IMAGEWIDTH = 1755
Const IMAGEHEIGHT = 1760

Const FORM_WIDTH = 7575 'WIDTH OF FORM
Const FORM_HEIGHT = 7560 'HEIGHT OF FORM

Const HOME = 0 'HOME POSITION FROM (0.0)

Const RANDOMPOINT = 3000

Dim xCoord As Double
Dim yCoord As Double

Dim H_and_V_CHANGE As Integer 'constant to represent how many twips vertically
'and horizontally it movies each interval of the timmer.

Private Sub mnuOptionx_Click(Index As Integer)

Select Case Index

Case 0
'enlarge

tmrEnlargeReduce.Enabled = True
H_and_V_CHANGE = 120

Case 1
'reduce
H_and_V_CHANGE = -120

Case 2
'move

xCoord = InputBox("enter an x-coordinete", "Horiantal", Val("250"))
yCoord = InputBox("enter a Y-coordinete", "vertical", Val("250"))

imgX.Move xCoord, yCoord

Case 3
' reset

imgX.Move HOME, HOME

Case 4
' let it move on it own

tmrMove.Enabled = True
H_and_V_CHANGE = 120

Case 5
' random number

imgX.Move FORM_WIDTH * Rnd, FORM_HEIGHT * Rnd

End Select

End Sub
Private Sub tmrEnlargeReduce_Timer()

If imgX.Width <= FORM_WIDTH And imgX.Height <= FORM_HEIGHT Then

imgX.Width = imgX.Width + H_and_V_CHANGE
'enlarge, reduce width
imgX.Height = imgX.Height + H_and_V_CHANGE
'enlarge, reduce width

End If

If imgX.Width < style="color: rgb(51, 51, 255);">Then ' this line of code is wrong
tmrEnlargeReduce.Enabled = True
End If


End Sub

Private Sub tmrMove_Timer()

imgX.Left = imgX.Left + H_and_V_CHANGE

If imgX.Left <= RANDOMPOIT Then

imgX.Top = imgX.Top + H_and_V_CHANGE

Else

imgX.Top = imgX.Top - H_and_V_CHANGE

End If

End Sub

'okay guys and girls, that is it for today so just let me finish this form up.

ok people i will decide that the next scibe will be indrew for picking me.


end sub


To see what my form look like when is play click here.

1 Comments:

Blogger Mr. Malandrakis said...

Good job Jan. Great post. Keep up the good work!!

7:32 PM  

Post a Comment

<< Home