Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Shadow

Pages: [1]
1
DotNet / Re: VS2103 VB
« on: June 18, 2014, 04:51:15 pm »
I will try to look into some video to see how I can proceed.

Thanks for comment.

Shadow

2
DotNet / Re: VS2103 VB
« on: June 18, 2014, 01:56:00 pm »
Thanks Zsbzsb and Nexus.

I just return to home and recompile the code, this time it did not give out any error, but I fond the example use a method to draw text on screen cannot be found. Moreover, the event handler looks like not fired for close.

Here is my code, I just try to make it as simple as possible.

Module TestWithSFML

    Dim WithEvents NewWindow As RenderWindow

    Sub Main()

        Dim NewWindow As RenderWindow = New RenderWindow(New SFML.Window.VideoMode(1024, 768), "My New Window")
        Dim windowsFont As Font
        windowsFont = New Font("tahoma.ttf")
        Dim text = New Text("Hello", windowsFont)
        While (NewWindow.IsOpen())

            NewWindow.DispatchEvents()
            text.Position = New SFML.System.Vector2f(250.0F, 450.0F)
            text.Color = New Color(255, 255, 255, 170)

        End While


    End Sub

    ''' <summary>
    ''' Function called when the window is closed
    ''' </summary>
    Sub App_Closed(ByVal sender As Object, ByVal e As EventArgs) Handles NewWindow.Closed
        Dim window = CType(sender, RenderWindow)
        window.Close()
    End Sub

    ''' <summary>
    ''' Function called when a key is pressed
    ''' </summary>
    Sub App_KeyPressed(ByVal sender As Object, ByVal e As KeyEventArgs) Handles NewWindow.KeyPressed
        Dim window = CType(sender, RenderWindow)
        If e.Code = Keyboard.Key.Escape Then
            window.Close()
        End If
    End Sub

End Module
 

Thanks.
Shadow

3
DotNet / VS2103 VB
« on: June 17, 2014, 07:20:40 pm »
I am trying to program a RL game and looking for a fast drawing face. I found SFML that can support .net calling so I download and tried it. The progress is slow, but would like to use SFML for it.

Currently, I am running into a font creation problem, I would like to see if anyone had a similar setting like me and able to load the font properly in VB.

Thanks,
Shadow

Pages: [1]