PDA

Click to See Complete Forum and Search --> : Star Scrolling


Hmpf
Jul 13th, 2000, 06:49 AM
Hey , I Usually Work On TP 7.0 Of Borland For Dos
SO I ran in some problems in vb4
i tried to put a picture box and some stars and wanted
to scroll the screen

so i wrote something like this :
In Forum Activated

While Not Game_Exit
Doevents
MoveStars
DrawStars
.......
.......
MoveShips
.........
Wend


and i saw its toooooooo slow to be true
in pascal i can use dynamic virtual memory to solve the speed problem but in vb i know only PSET which is too slow to use , if there is a better way ( i know there is) or even directx methods to use to make it faster
I WANT IT TO RUN SMOOOOOOTHHHLY like in dos

... why the heck did i buy windows :))) when i have such a great dos with INTERRUPT TABLES And MEMORY ADDRESSES

:)

help . thank you in advance

worf
Jul 13th, 2000, 03:49 PM
Well I made a scrolling text by doing this:

2. make a picture box
3. put all the text's and images in the picture box
4. Move the picture box

I hope that works.

Jotaf98
Jul 15th, 2000, 04:50 PM
What you need is an API!

Create a regular module and paste this there:

Public Declare Function SetPixel Lib "gdi32" (ByVal hdc As Long, ByVal X As Long, ByVal Y As Long, ByVal crColor As Long) As Long

Then, to use the function, here's how:

SetPixel Picture1.hDC, X, Y , ColorToUse

That's it! I guess you don't need anymore explanations :p

The best of all is that this is about 1000 faster than pset =)

Bye,

-Jotaf98

jotaf98@hotmail.com - ICQ#60784495 - http://jotaf98.cjb.net

Hmpf
Jul 16th, 2000, 04:37 AM
Thanx Man , But The Thing Is That The Message Is Kinda Old
And Now I Use Vertical Scorlling With Transparcy For My Ships

I DISCOVERD BITBLT , HEHEHEH, Thanks Anyway