Using Direct X in Windows 8


  • I wrote a little program in Visual Basic using DirectX. That was on Windows XP. The program works fine on Windows XP.

    When I try the same prog in Windows 8, I get the following error:

    A first chance exception of type 'Microsoft.DirectX.DirectDraw.UnsupportedException' occured in Microsoft.DirectX.DirectDraw.dll

    This error happened in this line:


    I already installed the developers version of Microsoft DirectX and also .NET 3 .NET 4 and .NET 4.5

    What can be the cause of this error?

    • Edited by Syncan Thursday, June 14, 2012 6:32 PM
    Thursday, June 14, 2012 6:31 PM

All replies

  • DirectX an Net is like Cat and Dog, if you want to use DirectX then don't use .Net and if you want to use .net don't use DirectX.

    (Net 2.0 was the last which  had some support for DirectX)


    Friday, June 15, 2012 5:32 AM
  • Hi Syncan,

    I noticed that the exception was UnsupportException, and after research I found this:

    Warning: This class is deprecated. Deprecated components of Microsoft DirectX 9.0 for Managed Code are considered obsolete. While these components are still supported in this release of DirectX 9.0 for Managed Code, they may be removed in the future. When writing new applications, you should avoid using these deprecated components. When modifying existing applications, you are strongly encouraged to remove any dependency on these components.

    The operation is not supported. Deprecated.

    Which means this method may not supported in the new version OS. 

    I hope this will be helpful.

    Best regards,

    Shanks Zen
    MSDN Community Support | Feedback to us

    Friday, June 15, 2012 6:54 AM
  • This reminds me to another topic I opened:

    Visual Basic .NET in Windows 8

    In the first place Microsoft decided not to allow .NET into Visual Studio 2012 express for Windows 8, but later they decided to still put it in the finished version of Visual Basic 2012 express ( all to find in that link )

    AS it is now, DirectX does not work properly for Visual Studio 2010 express either in Windows 8.

    Maybe those deprecated components of Microsoft DirectX 9.0 for Managed Code will also putted back in both Visual Studio 2010 and 2012 Express ? Maybe somebody knows if that's the case?

    If not, I have a problem: I am learning from the book "Learn VB .NET through game programming" and all examples about Direct X will not work anymore. They DO work in Windows XP, so that would stop me from buying the retail version from Windows 8.

    • Edited by Syncan Friday, June 15, 2012 9:55 AM
    Friday, June 15, 2012 9:49 AM
  • Use SlimDX or SharpDX.
    Friday, June 15, 2012 11:57 AM
  • Never heard of it. Is that with the same set of functions as DirectX and can I use it in Visual basic?
    Friday, June 15, 2012 12:00 PM