This project is read-only.

Silvermoon in vb

Oct 29, 2009 at 12:23 PM



We try to show a simple dialog in vb.


I created this class: confirma.vb

Imports System
Imports System.Collections.Generic
Imports System.Text
Imports Silvermoon.Controls
Imports System.Drawing
Imports Silvermoon.Animations
Imports Silvermoon.Controls.Classes
Imports Silvermoon.OpenGL

Public Class confirma
    Inherits Silvermoon.Controls.Dialog
    Private label As Label
    Private titleBox As TextBox

    Public Sub New(ByVal title As String, ByVal message__1 As String)
        titleBox.Text = title
        Message = message__1
    End Sub

    Public Sub New()
        Height = 340
        'Margin = new Margin(0, null, 0, 0);
        Margin = New Margin(10, 100, 10, Nothing)
        Alpha = 220
        HideTransition = TransitionMode.ZoomOut Or TransitionMode.FadeOut

        ' we add two DialogButtons here, one with Result=DialogResult.OK and another with Result=DialogResult.Cancel:
        Controls.Add(New DialogButton())
        Controls.Add(New DialogButton())

        'Font = FontSprite.Bold,
        label = New Label()

        titleBox = New TextBox()
        Dim td As New TextureDecorator()
    End Sub

    Public Property Message() As String
            Return label.Text
        End Get
        Set(ByVal value As String)
            label.Text = value
        End Set
    End Property
End Class


and in my vb form i write this


 Dim mensaje As New confirma
  mensaje.Message = "Desea borrar el registro"
  mensaje.TextColor = Color.Beige


Whe run, this error appeas:


No se controló Silvermoon.OpenGL.Native.OpenGlException
  Message="Error on glGenTexture."
    at Silvermoon.OpenGL.Texture..ctor()
    at Silvermoon.Images.SysImages.CreateImage()
    at Silvermoon.Images.SysImages.get_MenuBackground()
    at Silvermoon.Controls.Dialog..ctor()
    at asisnet_pda.confirma..ctor()
    at asisnet_pda.asisnet..ctor()
    at System.Reflection.RuntimeConstructorInfo.InternalInvoke()
    at System.Reflection.RuntimeConstructorInfo.Invoke()
    at System.Reflection.ConstructorInfo.Invoke()
    at System.Activator.CreateInstance()
    at MyForms.Create__Instance__()
    at MyForms.get_asisnet()
    at asisnet_pda.asisnet.Main()


Can you help me?