Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

gamechampionx

Need help... urgent, with VB6

This topic is 6081 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I need to know how to make a text-label move quickly without being horribly choppy. I''m using a timer object, and I''m on the interval of 1, but it still sucks. Is there some way of delaying execution for a certain number of milliseconds, so that no timer object is needed. I need to work in milliseconds, not what the timer object uses. Thanks.

Share this post


Link to post
Share on other sites
Advertisement
Your kidding yourself... I am a VB programmer, and if you want to make any kind of animation you better do it some other way, like API calls, or DirectX

Share this post


Link to post
Share on other sites
1) Timer object DOES work in milliseconds
2) No posible way to use the Move method of an object without getting choppiness. WHy do you need this? I can detail other ways...

-----------------------------
Damnit Dave, I would have a link to Graphics Wars here, but you haven''t put it up on GDNet yet!

The sad thing about artificial intelligence is that it lacks artifice and therefore intelligence.

Democracy is where you say what you want and do what you''re told.

Share this post


Link to post
Share on other sites
I need this because I''m making a game, and I want to animate the text on the story page. Everything I''ve tried looks like utter crap because it''s so CHOPPY! A timer''s interval seems to coarse, how does the number system work, I don''t think it''s milliseconds. Anyway, I just want to make the text move smoothly.
The kind of code I''m using is Label1.Left = Label1.Left + 1, and that sort of thing, using various if statements. I understand the language very well, and the text does what I want, just too choppy.

Share this post


Link to post
Share on other sites
use the api timegettime

public sub pause(numseconds)
time1=timegettime()
do
'' do events ?
repeat until timegettime-time1>=numseconds
end sub


-----------------------------------------------

"Cuando se es peon, la unica salida es la revolución"

Share this post


Link to post
Share on other sites
timegettime is a api, you obtain the millisecond from the midnight.

the example, generate a pause durant a amount millisecond.

I think the best is to generate the next
time1=timergettimer

public sub move
time2=timegettime
if time2-time1<200 then
'' here move the object
time1=time2
end if
end sub

with this, you move the object, with a interval = 0.2 seconds.





-----------------------------------------------

"Cuando se es peon, la unica salida es la revolución"

Share this post


Link to post
Share on other sites
The problem you are having is not with the timer, it is with the draw rate of VB''s controls. Without using API acceleration you can''t make smooth scrolling text. Unless you stretch the label all the way across the form and the with the timer. Change the number of spaces before the text. Every interval subtract a space. When the message gets to the left side. Just reset the number of spaces. That is one way to do it. Or you could just use the print call.

Good luck, I know what position your in. I was the same way. Keep trying.


Dylan, Let''s show the world something

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!