Results 1 to 3 of 3

Thread: VS 2005 VB.Net and DX9 questions

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2005
    Posts
    15

    VS 2005 VB.Net and DX9 questions

    I searched for this but came up with no answer. I am trying to learn to use managed DirectX so I can improve the performance in my VB.Net application, which right now uses GDI+. Unfortunately, in VS 2005, MS seems to have made some changes so that animated GIFs are slower and moving pictureboxes/panels on the screen is also a lot slower.

    I need to be able to do the following in DirectX:

    Display animated GIFs and be able to move them around the screen.

    Display other images like JPGs, and be able to specify the area of that image to show, with the abilities to scale/stretch like the GDI+ can.

    Draw text on the screen with the font capabilities and such that GDI+ has.

    I assume (and hope) DirectX9's DirectDraw would have all these abilities.


    I've been wanting to switch to DirectX for a while now because I know it's a far superior way of doing the graphics things I am doing, but the problem has been finding simple tutorials and examples for DirectX9 DirectDraw as well as working source code.

    It looks like I will have to now. So, I began by going to the site that everyone recommends here: directx4vb.com. I downloaded their tutorial for directx9, but when I try to run their source code example, it won't compile. The following errors show up in multiple places:

    Error 5 Overload resolution failed because no accessible 'DrawText' can be called with these arguments:
    'Public Function DrawText(sprite As Microsoft.DirectX.Direct3D.Sprite, text As String, pos As System.Drawing.Point, color As Integer) As Integer': Value of type 'String' cannot be converted to 'Microsoft.DirectX.Direct3D.Sprite'.
    'Public Function DrawText(sprite As Microsoft.DirectX.Direct3D.Sprite, text As String, pos As System.Drawing.Point, color As Integer) As Integer': Value of type 'System.Drawing.Rectangle' cannot be converted to 'String'.
    'Public Function DrawText(sprite As Microsoft.DirectX.Direct3D.Sprite, text As String, pos As System.Drawing.Point, color As Integer) As Integer': Value of type 'Microsoft.DirectX.Direct3D.DrawTextFormat' cannot be converted to 'System.Drawing.Point'.
    'Public Function DrawText(sprite As Microsoft.DirectX.Direct3D.Sprite, text As String, pos As System.Drawing.Point, color As Integer) As Integer': Value of type 'System.Drawing.Color' cannot be converted to 'Integer'.
    'Public Function DrawText(sprite As Microsoft.DirectX.Direct3D.Sprite, text As String, pos As System.Drawing.Point, color As System.Drawing.Color) As Integer': Value of type 'String' cannot be converted to 'Microsoft.DirectX.Direct3D.Sprite'.
    'Public Function DrawText(sprite As Microsoft.DirectX.Direct3D.Sprite, text As String, pos As System.Drawing.Point, color As System.Drawing.Color) As Integer': Value of type 'System.Drawing.Rectangle' cannot be converted to 'String'.
    'Public Function DrawText(sprite As Microsoft.DirectX.Direct3D.Sprite, text As String, pos As System.Drawing.Point, color As System.Drawing.Color) As Integer': Value of type 'Microsoft.DirectX.Direct3D.DrawTextFormat' cannot be converted to 'System.Drawing.Point'. CSampleGraphicsEngine.vb 340 13 Basic_D3D9

    So, I still haven't been able to find working source code examples for DirectDraw in DX9. Note I am wanting to use DirectDraw here, not Direct3D. I have no need for 3D capabilities in my app.

    If anyone has any ideas, please let me know. Thanks

  2. #2

    Thread Starter
    New Member
    Join Date
    Mar 2005
    Posts
    15

    Re: VS 2005 VB.Net and DX9 questions

    Wow, I guess nobody knows? I found a really good source code example using DirectDraw, and then found out DirectDraw is deprecated. You are forced to use Direct3D now. Anyone know of good sites that have example source code using Direct3D for 2D stuff, like what I need to accomplish in my above post?

  3. #3
    Elite Hacker Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,349

    Re: VS 2005 VB.Net and DX9 questions

    Quote Originally Posted by Indigo7
    I searched for this but came up with no answer. I am trying to learn to use managed DirectX so I can improve the performance in my VB.Net application, which right now uses GDI+. Unfortunately, in VS 2005, MS seems to have made some changes so that animated GIFs are slower and moving pictureboxes/panels on the screen is also a lot slower.
    That's why I hate .NET so much. It's slower than it's previous languages. Try to avoid using the framework functions (unless you need to), and focus more on programming in general rather than have it be all OOP. The best place for DirectX9 tutorials seems to be over at GameDev.Net. You oughta check that place out.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width