CS.RIN.RU - Steam Underground Community
http://cs.rin.ru/forum/

VB6-help a friend.. :wink:
http://cs.rin.ru/forum/viewtopic.php?f=14&t=8913
Page 2 of 2

Author:  Tical [ Monday, 27 Dec 2004, 04:34 ]
Post subject: 

If you got any problems, ask me. I'll give you the answer as fast as possible

Author:  |2eM!x [ Monday, 27 Dec 2004, 12:11 ]
Post subject: 

yeah i got some problems..i dont know how to set time as userdefined

timer1.time = ("userdefined")
doesnt work..
and u unno how to start time anyways..
so plz go on icq and we'll chat

Author:  jarro_2783 [ Monday, 27 Dec 2004, 13:04 ]
Post subject: 

|2eM!x wrote:
okay.i got the ticker working.
but now it goes under zero..so like -5 -6
but heres the code

Private Sub Timer1_Timer()
Text1.Text = CStr(Val(Text1.Text) - 1)
If Text1 = 0 Then
Print "you got"; txtbox1.Text
End If
End Sub

im glad i figured that out : )


try putting this:
if text1 > 0 then
Text1.Text = CStr(Val(Text1.Text) - 1)
end if

then it will only run when the text box is greater than 0.

You also might want to make a start button, to do that you could do something like this:

Private Sub cmdStart_Click()
clicked = true
end sub

private sub Timer1_Timer()
if clicked = true then
do all the stuff
end if
end sub

Author:  |2eM!x [ Monday, 27 Dec 2004, 14:18 ]
Post subject: 

@ jarro..
the If Text1 > 0 Then does not work..it prints every second..i only want it to print when it hits zero thus the =

heres my whole code
"Private Sub cmdclicker1_Click()
txtbox1.Text = CStr(Val(txtbox1.Text) + 1)
End Sub

Private Sub Timer1_Timer()
Text1.Text = CStr(Val(Text1.Text) - 1)
If Text1 = 0 Then
Print "you got "; txtbox1.Text
End If
End Sub

"
and it works except it starts auto..im not sure how to implement that stuff you meant..so if you could re-iterate id appreciate it :wink:

Author:  |2eM!x [ Monday, 27 Dec 2004, 16:22 ]
Post subject: 

oh thats not for the clock, thats for the lil mini game..

Author:  ClarencE [ Tuesday, 28 Dec 2004, 03:42 ]
Post subject: 

remix can u do a proggy game like "snake" game in nokia cellphones?

Author:  fanmail [ Tuesday, 28 Dec 2004, 09:42 ]
Post subject: 

There's already a proggie like that in FlashFXP:
Go to Help>About then double-click on the logo :P

Author:  jarro_2783 [ Tuesday, 28 Dec 2004, 15:29 ]
Post subject: 

you'll have to wrap the if text>0 then around the right spot. You'll need to keep the if text = 0 then print, but put if text > 0 then in the right spot so it only counts down up until zero.

Author:  ClarencE [ Tuesday, 28 Dec 2004, 15:39 ]
Post subject: 

gl remix ;)

Author:  |2eM!x [ Friday, 07 Jan 2005, 03:53 ]
Post subject: 

okay guys got it working and it stops on zero and theres a restart button

sorry its so lame but w/e
@Jarro or Bluntmann...

"
Private Sub Form_Load()
Timer1.Enabled = False
End Sub

Private Sub cmdclicker1_Click()
Timer1.Enabled = True
txtbox1.Text = CStr(Val(txtbox1.Text) + 1)
If Text1.Text <= 0 Then
Timer1.Enabled = False
enter = 0
End If
End Sub

Private Sub Restart_Click()
Shell (App.Path & "\game2.exe"), vbNormalFocus
End
End Sub

Private Sub Timer1_Timer()
Text1.Text = CStr(Val(Text1.Text) - 1)
If Text1 = 0 Then
Print "you got "; txtbox1.Text
End If

End Sub
"

i finally got the damned thing working!!
I was gonna post about how i couldnt get it to work..turns out im an idiot.

heres the link if you wanna play~
http://s7.yousendit.com/d.aspx?id=0H48M ... 001MQ8T6WF

Author:  Tical [ Friday, 07 Jan 2005, 05:23 ]
Post subject: 

okay, i'll take a second look at it. I'll ask a german vb-expert

Author:  |2eM!x [ Friday, 07 Jan 2005, 07:26 ]
Post subject: 

okie..jarro how do i make it so that the enter button cant be used?

like dim 13 as ascii
13 = 0 or something?

Author:  jarro_2783 [ Friday, 07 Jan 2005, 16:18 ]
Post subject: 

Try this, there's a command called keypress, it is used like this:

Private Sub Command1_KeyPress (KeyAscii As Integer)
End Sub

Then find out the ascii for enter and you could put:

if KeyAscii = number then
end if

Having the blank in there might mean nothing happens.

Author:  Tical [ Tuesday, 11 Jan 2005, 07:55 ]
Post subject: 

Okay, to get the ascii-value for a key, create a new projekt.

You need:
- a form
- a textbox/label

and this source-code:

Private Sub Command1_KeyPress (KeyAscii As Integer)
text1.text (or label1.caption) = Keyascii
End Sub

The ascii value for enter is 13!


and this is a more elegant solution for Jarros Code:
...
if KeyAscii = 13 then exit sub
....


I'm on icq atm!

Author:  Tical [ Wednesday, 12 Jan 2005, 02:00 ]
Post subject: 

Oh and here ClarencE:
Your snake game:

(not mine, but i think thats better ,lol)

http://arcade.reflexive.com/downloadgam ... 7&CID=4061
and heres the crack:
http://anonym.to/?http://s21.yousendit.com/d.aspx?id=0TKK64K461H8Q1NN95XLK0N11H
Have fun!

Page 2 of 2 All times are UTC + 3 hours
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/