Jump to content
  • Advertisement
Sign in to follow this  

Windows 98 and ME Problems

This topic is 5216 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

When I run my program using DirectX 9 and VB.NET on Windows 98 and Me, everything that is drawn with D3DFont.DrawText shows a box after the text. Can someone point out a problem with this code (only 57 lines). Download to run it (1.74 KB)
Imports Microsoft.DirectX
Imports Microsoft.DirectX.Direct3D

Public Class frmTest
    Inherits System.Windows.Forms.Form

    'DirectX objects
    Private f As Direct3D.Font
    Private device As device = Nothing

    Sub New()
        'Setup form
        Me.Text = "DirectX Test"

        'Presentation parameters
        Dim presentParams As New PresentParameters()
        presentParams.Windowed = True
        presentParams.SwapEffect = SwapEffect.Discard

        'Setup device
        device = New Device(0, DeviceType.Hardware, Me, CreateFlags.SoftwareVertexProcessing, presentParams)

        'Create font
        f = New Direct3D.Font(device, New System.Drawing.Font(FontFamily.GenericSansSerif, 8))

        'Show the form

        'Render loop
        While Created

            'Clear the backbuffer to a blue color
            device.Clear(ClearFlags.Target, System.Drawing.Color.Blue, 1.0F, 0)

            'Begin the scene

            'Draw some text
            With f
                .DrawText("Hello, World!", New Rectangle(0, 0, 1000, 1000), DrawTextFormat.Top Or DrawTextFormat.Left, Color.White)
            End With

            'End the scene

        End While

        'End the program

    End Sub
End Class

Share this post

Link to post
Share on other sites
Does it not do it with Windows 2000 or XP? Also, what do you mean by draws a box. That could be anything. Is it an outline, 1 pixel width, filled in, etc.


Share this post

Link to post
Share on other sites
Yes it works with XP (and I assume also with 2000). The box is the outlined box that you get when you hit Ctrl+Backspace in Notepad. ()

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!