copyright 1999 - 2014 by heinz prelle - hannover  - lenbachstraße 42 - www.visual-basic5.de | impressum
'Beispiel: VB .Net - Unicodezeichen ausgeben
'
Option Explicit On
Option Strict On

Imports System.Text

Public Class Form1

    Private Function DrawUnicodeChar(ByVal CharCode As Integer) As String
        Try
            Dim UnicodeChar As String = ChrW(CharCode)
            Return (UnicodeChar)
        Catch ex As ArgumentException
            MessageBox.Show(ex.Message.ToString(), "ArgumentException")
        Catch ex As Exception
            MessageBox.Show(ex.Message.ToString(), "Exception")
        End Try
        Return String.Empty
    End Function

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) _
            Handles MyBase.Load
        CenterToScreen()
        For n As Integer = 900 To 970
            Me.ComboBox1.Items.Add(n.ToString())
        Next
        Me.ComboBox1.SelectedIndex = 31
    End Sub

    Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) _
            Handles ComboBox1.SelectedIndexChanged
        Me.Label1.Text = DrawUnicodeChar(CType(Me.ComboBox1.SelectedItem, Integer))
    End Sub

End Class