Tim Preuster

blog

  Home  |   Contact  |   Syndication    |   Login
  7 Posts | 0 Stories | 6 Comments | 0 Trackbacks

News

Archives

Post Categories

No, I am not talking about the point that there are no more VB.NET samples in the new 9.0c SDK. I even like the fact that they are now concentrating on one language to have more examples, so please keep up the good work and give us more manged DirectX stuff (I want to see more managed examples then C++ stuff).

I mean the following thing in the Font Class (Which is used also in GUI example) :

Public Function DrawText( _
    ByVal sprite As Sprite, _
    ByVal text As String, _
    ByVal rect As Rectangle, _
    ByVal format As DrawTextFormat, _
    ByVal color As Color _
) As Integer

Or

Public Function DrawText( _
    ByVal sprite As Sprite, _
    ByVal text As String, _
    ByRef rect As Rectangle, _
    ByVal format As DrawTextFormat, _
    ByVal color As Color _
) As Integer

Which differs only in the rect Value which is one time byval and one time byref so I am getting a "not most specific" error when I want to compile. I am still able to DrawText by another function call but then it is not possible to use the DrawTextFormat for formatting the text :-( .

So does anyone know a way to specify which way I want to call in VB.net or is it really a design flaw ?!?!

 

posted on Wednesday, September 08, 2004 7:19 PM

Feedback

# re: How DirectX discriminates VB.net developers .... or not ?!? 11/3/2004 10:08 PM Tim
I agree. This overload directly violates the rules of overloading procedures in VB.Net. There is no way (that I can find) of specifying a parameter as ByVal or ByRef. The docs mention surrounding an argument with parentheses to force a parameter to be bassed ByVal, but it doesn't work. This is ridiculous!

# re: How DirectX discriminates VB.net developers .... or not ?!? 11/30/2004 11:01 AM Knight Chat X
Try this class example for using DrawText in VB.Net with DirectX9.0c if you'd like, it shows how to render text and set various properties:
http://www.vbgamer.com/msgboard/topic.asp?TOPIC_ID=327

# re: How DirectX discriminates VB.net developers .... or not ?!? 12/1/2004 5:40 PM David Weller
Yes, mea culpa. I will post it on my blogs (http://blogs.msdn.com/dweller and http://www.inkblog.com) in just a few minutes. Feel free to download it for whatever use you want!


Post Feedback

Title:
Name:
Email: (never displayed)
Url:
Comments: 
Please add 8 and 8 and type the answer here: