|
-
Nov 19th, 2005, 04:27 PM
#1
Thread Starter
New Member
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|