473,387 Members | 1,493 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,387 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 2963
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.