Log in

View Full Version : Help with VB6?



ownaginatious
12-31-2006, 01:30 PM
I know there are a lot of programming enthusiasts here, and I thought maybe some of you could help me with this problem I'm having with the project I'm making in Visual Basic 6 for school.

The problem is that the program visually runs visually laggy, meaning it processes everything fine, but the visual effects look like crap. It needs to be able to scroll text and make labels appear to "move" with the use of timers. The only way I've figured out how to make it work is by manually going into the computers settings and changing the mode to "Graphics Acceleration", but that's seems like it's specific to the manufacturer of the video card. I think the problem is that stupid VB6 was never "intended" to be used for moving objects on the form quickly...

Is there like an API or something that will basically tell the computer to give more resources to the program to visually speed the thing up? Or is there something as simple as:

Form1.GraphicsAcceleration = True

I remember last year when we had to work in a language called "Turing" (similar to Pascal), it had some kind of windows setting that allowed all the games I made to run with no lag at all.

Any help would be greatly appreciated, thanks!

DaveW
01-01-2007, 08:00 AM
Sounds to me like you're doing a lot of unnecessary work every round.

Can't really help you without seeing your code though.

-Dave

silverdemon
01-02-2007, 06:14 AM
what dave is saying is true, without the code we can't really help you...

BUT

I have once found a really simple way to put some delays in your programs in VB. put this function somewhere in your program:

Sub Delay(ByVal Seconds As Double)
StartTime = Timer
Do
DoEvents
Loop Until Timer > StartTime + Seconds
End Sub
and then call it by:

delay ***
with the number of SECONDS delay on the spot of the ***

really simple, really short. I don't know if it help you though, probably wont...