Post

 Resources 

Console

Home | Profile | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 VBGamer
 VBGamer
 error message in tutorial

Note: You must be registered in order to post a reply.

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List Spell Checker
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

   Insert an File
Check here to include your profile signature.
Check here to subscribe to this topic.
    

T O P I C    R E V I E W
und3rd06 Posted - Jun 16 2006 : 07:57:07 AM
Hi all I followed the tutorial from this site:

http://www.vbgamer.com/tutorial.asp?ndx=44


However I get an error at the following line

GraphicsCard.SetCooperativeLevel(Me, CooperativeLevelFlags.FullscreenExclusive)

The error message is:
'Microsoft.DirectX.DirectDraw.ExclusiveModeAlreadySetException' occurred in microsoft.directx.directdraw.dll

Btw, I really love your tutorial. It is very well explained. I did 2 full games in DX7 but now I was a bit confused with the "init" part of DX9. Thanks for the well commented code and the naming convention is good as well.
9   L A T E S T    R E P L I E S    (Newest First)
Lachlan87 Posted - Aug 06 2006 : 08:58:54 AM
Krisc, I think you are thinking of the C based languages. "..\dxtest.bmp" should work fine in VB.
Krisc Posted - Aug 06 2006 : 01:37:31 AM
I believe you will need to provide a \\ instead of a \... not to be a nitpick or anything.
VBBR Posted - Jul 25 2006 : 08:15:01 AM
"..dxtest.bmp" will never be a valid path. But you could try "..\dxtest.bmp" if the idea is getting a file that's one directory up.
Spodi Posted - Jul 23 2006 : 3:45:37 PM
Is ..dxtest.bmp a valid path? I dont know if that differes from VB 6.0 to VB.NET, but I think you may have to supply the full file path.
Japheth Posted - Jul 19 2006 : 6:43:35 PM
I got the following error on:
sprite = New Surface("..dxtest.bmp", New SurfaceDescription, GraphicsCard)

Value does not fall within the expected range.

I'm using VB.NET 2005. I hope someone can help me
Lachlan87 Posted - Jun 16 2006 : 6:55:01 PM
Sounds plausible.

I take it your problem is completely resolved now?

Anyway, I'm glad my tutorial was able to help you. I haven't really had time for programming lately, so I'm a bit rusty, but it's good to see that work I did quite a while back is still helpful!
und3rd06 Posted - Jun 16 2006 : 1:48:42 PM
ok so I was a bit suspicious that adding this imports would be relevant to the fix....

The problem was this :

I had 2 instances of v.net running bot solutions had references to the DirectX libarires.
One of my solutions was in break mode. so it still had a handle on the directX ?
und3rd06 Posted - Jun 16 2006 : 1:32:38 PM
found my answer

needed to add

Imports System.Drawing
und3rd06 Posted - Jun 16 2006 : 1:12:00 PM
Ok so I decided to try every available enum for the final parameter of the GraphicsCard.SetCooperativeLevel(Me, CooperativeLevelFlags.SetFocusWindow) call.

I hope this will help. Can somebody send me the full project in the zip file. I have no idea why this doesn't work ?

Here are the results I get for each enum I tryed:
AllowModeX & AllowReboot & CreateDeviceWindow & Exclusive & Fullscreen & NoWindowChanges & SetDeviceWindow & =
An unhandled exception of type 'System.ArgumentException' occurred in microsoft.directx.directdraw.dll
Additional information: Value does not fall within the expected range.


FullscreenExclusive & FullscreenExclusiveAllowModex & =
An unhandled exception of type 'Microsoft.DirectX.DirectDraw.ExclusiveModeAlreadySetException' occurred in microsoft.directx.directdraw.dll
Additional information: Error in the application.



Normal & SetFocusWindow =
An unhandled exception of type 'Microsoft.DirectX.DirectDraw.NoExclusiveModeException' occurred in microsoft.directx.directdraw.dll
Additional information: Error in the application
This error happens at following line of code : GraphicsCard.SetDisplayMode(800, 600, 16, 0, False)

Thank you...

VBGamer © Go To Top Of Page
This page was generated in 0.08 seconds. Snitz Forums 2000

Copyright © 2002 - 2004 Eric Coleman, Peter Kuchnio , et. al.