DirectX under VB, help

Started by
4 comments, last by LackOfKnack 24 years, 5 months ago
well, i'm not too much into vb, but here's what it looks like in my tutorial:
Call objDD.SetCooperativeLevel (Me.hwnd, DDSCL_NORMAL) i don't think the "Call" matters, but do braces help?
Advertisement
If you use the DDSCL_EXCLUSIVE flag you have to also use the DDSCL_FULLSCREEN flag.

Former Microsoft XNA and Xbox MVP | Check out my blog for random ramblings on game development

In VB,

Call proc(x,y)
is the same as:
proc x, y

And I thought it might be something to do with the fullscreen thing, but I tried modifying the tutorial and taking out that parameter and it still runs without error, although no output is created. But I just tried your suggestion and it worked. WTH? Why doesn't it mess up the tutorial? Oh well.

Thanks.

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

Lack

Lack
Christianity, Creation, metric, Dvorak, and BeOS for all!
1. No need to pass formx.hwnd just pass 0. Only needed for Fullscreen mode.
2. Exclusive is only for fullscreen mode I believe.

What is wrong with the following:


Set DD = DX.DirectDrawCreate("")

formX.Show
DD.SetCooperativeLevel formX.hWnd,_
DDSCL_EXCLUSIVE
DD.SetDisplayMode 1024, 768, 24, 0,_
DDSDM_DEFAULT

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

It highlights setco-op and says invalid argument. formX is the one and only form there, but I can't use Me.hWnd because I'm in a module. This is how the tutorial does it- and that seems to run. Thanks for any help, I'm using VB5 and DX 7 (of course).

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

Lack

Lack
Christianity, Creation, metric, Dvorak, and BeOS for all!
Thanks, I'll give it a shot. The hWnd isn't required... hmm.

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

Lack

Lack
Christianity, Creation, metric, Dvorak, and BeOS for all!

This topic is closed to new replies.

Advertisement