473,287 Members | 1,813 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,287 software developers and data experts.

Timer - generating overflow

5
I'm writing an arcade game were I need a delay for the man between steps. Also using the keyboard arrows to direct user man. Using delay at 5000 (changeable)
Dim mark(15000)
'Sub
DEALAYMAN:
TIMER ON: CONST unmark =0, narkit = NOT unmark: start!= TIMER
num = 0
For n = 3 to delay STEP 2
IF NOT mark(n) THEN
delta = 3 * n
FOR i = 3 * n to delay STEP delta
NEXT: num = num + 1
END IF
NEXT
finish! - TIMER: RETURN
I tried a simpler method
DELAYMAN: TIMER ON: delay = TIMER + .004
TM1: dy = TIMER: IF DY < delay THEN GOTO TM1
RETURN
This works although .004 is too slow and although I stop pressing the arrown keys the man keeps on running
Can someone please help?
Thanks in anticipation.
joec
Jul 17 '06 #1
5 2957
joec
5
I am self taught, using visual basic msdos version, with this problem.
I do have version 6 for windows but finding it dificult to do graphics.
joec
Jul 17 '06 #2
sashi
1,754 Expert 1GB
Hi Joec,

in-order to have a better control of graphics in VB6 you need to work along with DirectX.. timer in VB6 is assumed as miliseconds.. remember that my fren.. check out msdn for some example code on using DirectX along with VB6.. good luck my fren..
Jul 17 '06 #3
joec
5
Thankyou Sashi, but it is not in VB6 that I need the help it is in visual basic msdos version I am in the middle of a program.
joec
Jul 17 '06 #4
iam_clint
1,208 Expert 1GB
an overflow means the var probably got to long you need to reset the var after so long.
Jul 17 '06 #5
joec
5
Thank you all. I didn't make myself clear. The program executes fine with F5 it's when I try to Make it an exe file that I get "program memory overflow". Sorry to have wasted your time. Regards. joec
Jul 18 '06 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Roberto Dias | last post by:
Hi all, I've got some column delimited text files used as input file to a power engineering application. I'm trying to create a "more-friendly" interface using C++. The C++ program should be...
8
by: bearophileHUGS | last post by:
Hello, I have four things to ask or to suggest, sorry if they seem basic or already discussed. ------------------- I am still ignorant about Tkinter. This little program, after pressing the...
1
by: Can Balioglu | last post by:
Hi, I don't know if it's already known but I found a bug in System.Timers.Timer class. The 'Interval' property accepts a double which specifies the interval between two 'Elapsed' events. The...
2
by: Michael Evans | last post by:
First, we rely on a stable update rate so that our physics and dynamics calculations and integrations are based on a known interval and therefore are true-to-life. Second, the graphics positions...
13
by: vasudevmukherjee | last post by:
Hi! Can somebody help tell me why the following code gives a garbage value while producing first student's name, whereas it gives the names correctly for other three students - I really fail to...
1
by: archana | last post by:
Hi all, I want to clear one doubt which i am facing regarding timer. Suppose i have one timer in which i am generating some files. and interval of my timer is say 5 min. Say suppose at...
6
by: Michael C | last post by:
I've created a timer object and set it running without keeping a reference to it and not stopping it. Shouldn't the garbage collector pick up that there's no reference to the timer, call finalize...
0
by: archana | last post by:
Hi all, I am facing some wired problem while using system.timers.timer in windows service. I have one function which i want to execute once day. So i set interval of my timer to 60000 *1440. ...
0
by: Andreas Schmitt | last post by:
I wrote a small timer class for use in a graphics engine I am working on for teaching myself. The small time based animations I tried with it seem to work fine but displaying the frame rate I...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.