hey i wanted to start a tomagatchi clone project with vb..
im having problems with it...
cann't get it so that as time pass( every 1 minute) that the hunger,boredom, and need to poop increase
i tried to use the timer but i cant get it down...
an example would help a lot!:mrgreen:
oh yea im using vb express and im just learning vb as school and wanted to try to program somthing cool with vb.
thx

Member Avatar for iamthwee

Let's see ya code please.

go easy on me :) i just started and don't really know what im doin :)
Public Class Form1
Dim play As Integer = lblplay.Text
Dim fullness As Integer = lblfullness.Text
Dim potty As Integer = lblfullness.Text

Private Sub btnfeed_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnfeed.Click


If fullness > 90 Then
MsgBox("Im full!!!")
Else
fullness = fullness + 10
End If

End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click


If play < 90 Then
play = play + 10
ElseIf play > 90 Then
MsgBox("I dont want to play anymore!")
End If
End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click

If potty < 90 Then
potty = potty + 10
ElseIf potty > 90 Then
MsgBox("I don't need to take a crap anymore!")
End If
End Sub

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Timer1.Enabled = True
Timer1.Interval = 1000
Dim play As Integer
Dim potty As Integer
Dim fullness As Integer
neglect(play, potty, fullness)
End Sub
Public Function neglect(ByVal hun As Integer, ByVal pla As Integer, ByVal pott As Integer)

Return hun = hun - 1
Return pla = pla - 1
Return pott = pott - 1

End Function

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click


End Sub
End Class

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.