Jump to content

View more

Image of the Day

The beast has a mighty searchlight of evil! #screenshotsaturday https://t.co/bzKepOojDL
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

DirectX under VB, help

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
5 replies to this topic

#1 LackOfKnack   Members   

122
Like
Likes
Like

Posted 27 October 1999 - 02:50 PM

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


#2 AlexM   Members   

122
Like
Likes
Like

Posted 23 October 1999 - 08:08 AM

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?

#3 Machaira   Moderators   

1033
Like
Likes
Like

Posted 23 October 1999 - 10:26 AM

If you use the DDSCL_EXCLUSIVE flag you have to also use the DDSCL_FULLSCREEN flag.

#4 LackOfKnack   Members   

122
Like
Likes
Like

Posted 24 October 1999 - 12:26 AM

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


#5 Rambo_Bill   Members   

114
Like
Likes
Like

Posted 27 October 1999 - 02:37 PM

1. No need to pass formx.hwnd just pass 0. Only needed for Fullscreen mode.
2. Exclusive is only for fullscreen mode I believe.



#6 LackOfKnack   Members   

122
Like
Likes
Like

Posted 27 October 1999 - 02:50 PM

Thanks, I'll give it a shot. The hWnd isn't required... hmm.

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

Lack





Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.