Imports System.Windows.Forms Imports System.IO Imports Microsoft.Ink Public Class Form1 'http://blog.wdnet.jp/tech/archives/148 Private Sub Button2_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button2.Click recognizerList.DisplayMember = "Name" Dim recognizers As Recognizers = New Recognizers() Dim recognizersEnum As Recognizers.RecognizersEnumerator = recognizers.GetEnumerator() recognizerList.Items.Clear() While recognizersEnum.MoveNext() Dim recognizer As Recognizer = CType(recognizersEnum.Current, Recognizer) recognizerList.Items.Add(recognizer) End While End Sub Private Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click If recognizerList.SelectedIndex = -1 Then MessageBox.Show("手書き認識エンジンを選択してください") Return End If Dim recognizer As Recognizer = CType(recognizerList.SelectedItem, Recognizer) InkEdit1.Recognizer = recognizer MessageBox.Show(recognizer.Name & "を設定しました") End Sub End Class