For Squirm (Direct Draw)

Epo
02-19-2002, 02:45 PM
Option Explicit

Dim DX As New DirectX7
Dim DD As DirectDraw7
Dim Primary As DirectDrawSurface7
Dim BackBuffer As DirectDrawSurface7
Dim BitSurf As DirectDrawSurface7
Dim ddsd1 As DDSURFACEDESC2
Dim ddsd2 As DDSURFACEDESC2
Dim ddsd3 As DDSURFACEDESC2


I've used the above code from Squirm's tutorial but get an error that the variable types haven't been defined. I'm guessing there are probably some APIs that need be declared, anybody know what they are? (I'm guessing atleast one person does) :)

Thanks alot

Squirm
02-19-2002, 03:57 PM
Did you set a reference to DirectX7 For Visual Basic Type Library in your references?

Click Project -> References check the box and click OK. :)

Epo
02-19-2002, 04:27 PM
Well that was simple :)

Thanks

Epo
02-19-2002, 04:41 PM
Call DD.SetDisplayMode(640, 480, 16, 0, DDSDM_DEFAULT)


if I omit the above line while using Direct Draw will the program crash or will the Screen Mode just stay as it currently is. The reason I'm asking is that I don't want my resolution changing each time I test/run the program...and my resolution (1024 by something.....or something like that) :) ..... my resolution might be too much for some older computers and I'm looking to make this as general as possible.

So, sum up. Do I need the code above for Direct Draw to work. If YES, then is there a way to just set the resolution as default?

Thanks again :)

P.S. What is the highest number of colours that can be used? Can the 16 be changed to 32? (And What does the 0 mean?) :)

Thanks

Epo
02-19-2002, 05:35 PM
One last question about this all (for now that is)

I have the program running (IT WORKS!) :)

but.....the mouse is kind of invisible, it keeps on flashing in the background when I move it :(

Is there a fix? :)

Thanks again :)

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum