none
ComboBoxのリストの並べ方と入力支援 RRS feed

  • 質問

  • こんにちは、今回もよろしくお願いします。

    社員テーブル Accessです。

    社員ID 、氏名 、フリガナ 、性別 、住所 、電話 と並んでいます。

    ComboBoxに、データバインドして、社員の氏名を表示・選択できるようにしているんですが、上から50音順に並べる方法はあるのでしょうか?現在は、勝手に性別順に並んでいるようです。(1=男 2=女)上位に男性の氏名がきて、その下に女性の氏名が表示されています。50音順のほうが調べやすいのでDBに登録してある「フリガナ」列を利用できないかと思い、やり方を教えていただきたいと思いました。

    あと、ComboBoxなのでユーザーが入力もできますので一文字目を入れたら候補が上位にくるか、候補だけドロップダウンリストに表示、という便利な方法はあるのでしょうか?ありましたら教えてください。よろしくお願い致します。

     

    2006年10月30日 3:34

回答

  • DBに存在するフリガナでソートをかけた結果をバインドすればいいと思います。もしくは、データテーブルからDataViewを作成して、それにバインドすることも考えられます。

    ComboBoxで選択する場合、表示される数があまり多いようですと、返って使いづらくなるようです。よくやる方法としては、例えば、ア行、カ行、サ行・・・のボタンを用意しておき、そこをクリックしたら、その行で始まる人のみ表示され、そこから選択させるなどが考えられます。今回は男女のチェックボックスもあった方が良いかもしれません。あとはそれにプラスして、普通にカナ、または漢字で検索機能も必要です。

    ちょっと話が脱線しましたね。(^^;

    2006年10月30日 4:29
    モデレータ

すべての返信

  • DBに存在するフリガナでソートをかけた結果をバインドすればいいと思います。もしくは、データテーブルからDataViewを作成して、それにバインドすることも考えられます。

    ComboBoxで選択する場合、表示される数があまり多いようですと、返って使いづらくなるようです。よくやる方法としては、例えば、ア行、カ行、サ行・・・のボタンを用意しておき、そこをクリックしたら、その行で始まる人のみ表示され、そこから選択させるなどが考えられます。今回は男女のチェックボックスもあった方が良いかもしれません。あとはそれにプラスして、普通にカナ、または漢字で検索機能も必要です。

    ちょっと話が脱線しましたね。(^^;

    2006年10月30日 4:29
    モデレータ
  • こんにちは、返信ありがとうございました。

    DBにソートをかけてバインドすればいいんですね!さっそく実践しました。

    私もComboBoxに一覧が表示される件数が多いので悩んでいました。ボタンをクリックして候補を表示するという方法は便利そうですね。入力した候補をあげるというのはちょっと大変かな、と思っていたので良いアイデアが見つかってうれしいです。ありがとうございました。

     

    2006年10月30日 5:25
  •  bykyo さんからの引用

    こんにちは、返信ありがとうございました。

    DBにソートをかけてバインドすればいいんですね!さっそく実践しました。

    私もComboBoxに一覧が表示される件数が多いので悩んでいました。ボタンをクリックして候補を表示するという方法は便利そうですね。入力した候補をあげるというのはちょっと大変かな、と思っていたので良いアイデアが見つかってうれしいです。ありがとうございました。

     

    解決してるようですが

     

     

     

    私はこんな感じの パネルにラベルを貼り付けた単純なユーザーコントロールを作り 名簿の検索などには多用しております

    ボタンなどをクリックすると これが出てくるようにし カナをクリックすると その行のリストが出てきて パネルが消える

    というものです

    2006年11月2日 23:05
  • こんにちは、返信ありがとうございました。

    実は先日、アイデアを頂き、チェックボックスを配置してみたのですが、フォーム上に結構たくさんコントロールが配置してあるのでスペースをつくるのに苦労してました。 パネルが出てきて、選択したら消える、というのはとても良さそうです。

    挑戦してみたいのですが、パネルは新しいFormを挿入して作成するのでしょうか?DataGridViewの列に設定してあるComboBoxでも選択できるような感じですか?どのような流れで作成するのかレクチャーしていただけるとうれしいです。

     

     

    2006年11月3日 3:58
  •  私は これを結構多用しているので いちいち作るのが面倒なので ユーザーコントロールとして作っています

    名付けて カナパネル

    そして コンボボックスではなく(多くのデータから選択する為)テキストボックスにし 特にピッタリとその位置で出てくる必要は無いと判断した為

    データグリッドビューの上の適当な位置にカナパネルを配置しておき VisibleをFalseにしてます(必要なときだけtrueにしBringToFrontで最前面に出す ) 

    そして リストにする為のデータグリッドビューをリストボックスのように縦に細長い形に作って このパネルと同じ位置にVisible=Falseで配置しておきます

    そして そのテキストボックスの上で ダブルクリック又はコントロールキーを押すとカナパネルが出てくるようにしてます

    その後 このパネルのカナをクリックするとパネルが消え 選択したカナから抽出されたデータが隠しておいたデータグリッドビューに表示され前に出てきます そしてこのデータグリッドビューをクリックすると これも消え 先に覚えさせておいたカレントセルに選択したデータが入るようにしてます

     ここでは このカナパネルを AaKanaPanel1としてますし メインのデータグリッドビューをViewNyuとしてます そして 選択されるカラムは「業者名」です

      Private Sub ViewNyu_EditingControlShowing(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewEditingControlShowingEventArgs) Handles ViewNyu.EditingControlShowing
            editingControl = e.Control
            AddHandler editingControl.KeyDown, AddressOf EditEnter
        End Sub

        Sub EditEnter(ByVal sender As Object, ByVal e As KeyEventArgs)
            If sender.GetType Is GetType(DataGridViewTextBoxEditingControl) Then
                    Dim cind As Integer = ViewNyu.CurrentCell.ColumnIndex
                    Dim Rind As Integer = ViewNyu.CurrentCell.RowIndex
                    currCell = ViewNyu.CurrentCell
                    Dim keyst As String = e.KeyCode.ToString
                If keyst =  "ControlKey" Then
                    Select Case True
                        Case ViewNyu.Columns(cind) Is 業者名
                            AaKanaPanel1.Visible = True
                            AaKanaPanel1.BringToFront()
                    End Select
                End If
            End If
        End Sub

        Private Sub ViewNyu_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles ViewNyu.DoubleClick
            Dim V As DataGridView = CType(sender, DataGridView)
            Dim ind As Integer = V.CurrentCell.ColumnIndex
            Dim rr As Integer = V.CurrentCell.RowIndex
            currCell = CType(V.CurrentCell, DataGridViewTextBoxCell)
            Dim col As DataGridViewColumn = V.Columns(ind)

            Select Case True
                Case col Is 業者名
                    AaKanaPanel1.Visible = True
                    AaKanaPanel1.BringToFront()
            End Select
        End Sub

     

     そして メインのカナパネルですが クラスとして作っていますので コードが非常に長いです

    他の方には 見づらくて迷惑かもしれませんが 書いておきます そのままコピペで使えるはずです

    カナをクリックしたときに eeValというイベントが発生することだけ覚えておいて頂ければ使えるかと思います

    Imports System.Windows.Forms
    Imports System.Drawing
    Public Class aaKanaPanel
        Inherits GroupBox

        Public お As ButtonUpDown
        Public を As ButtonUpDown
        Public に As ButtonUpDown
        Public ね As ButtonUpDown
        Public ぬ As ButtonUpDown
        Public な As ButtonUpDown
        Public の As ButtonUpDown
        Public と As ButtonUpDown
        Public あ As ButtonUpDown
        Public ゆ As ButtonUpDown
        Public よ As ButtonUpDown
        Public き As ButtonUpDown
        Public ん As ButtonUpDown
        Public や As ButtonUpDown
        Public み As ButtonUpDown
        Public め As ButtonUpDown
        Public む As ButtonUpDown
        Public ま As ButtonUpDown
        Public も As ButtonUpDown
        Public わ As ButtonUpDown
        Public か As ButtonUpDown
        Public け As ButtonUpDown
        Public た As ButtonUpDown
        Public つ As ButtonUpDown
        Public て As ButtonUpDown
        Public ち As ButtonUpDown
        Public う As ButtonUpDown
        Public り As ButtonUpDown
        Public れ As ButtonUpDown
        Public る As ButtonUpDown
        Public ら As ButtonUpDown
        Public ろ As ButtonUpDown
        Public ほ As ButtonUpDown
        Public し As ButtonUpDown
        Public せ As ButtonUpDown
        Public す As ButtonUpDown
        Public さ As ButtonUpDown
        Public そ As ButtonUpDown
        Public く As ButtonUpDown
        Public は As ButtonUpDown
        Public ふ As ButtonUpDown
        Public へ As ButtonUpDown
        Public ひ As ButtonUpDown
        Public い As ButtonUpDown
        Public こ As ButtonUpDown
        Public え As ButtonUpDown

        Public Event eeVal()

    #Region " Sub New"
        Public Sub New()

            Me.お = New ButtonUpDown
            Me.を = New ButtonUpDown
            Me.に = New ButtonUpDown
            Me.ね = New ButtonUpDown
            Me.ぬ = New ButtonUpDown
            Me.な = New ButtonUpDown
            Me.の = New ButtonUpDown
            Me.と = New ButtonUpDown
            Me.あ = New ButtonUpDown
            Me.ゆ = New ButtonUpDown
            Me.よ = New ButtonUpDown
            Me.き = New ButtonUpDown
            Me.ん = New ButtonUpDown
            Me.や = New ButtonUpDown
            Me.み = New ButtonUpDown
            Me.め = New ButtonUpDown
            Me.む = New ButtonUpDown
            Me.ま = New ButtonUpDown
            Me.も = New ButtonUpDown
            Me.わ = New ButtonUpDown
            Me.か = New ButtonUpDown
            Me.け = New ButtonUpDown
            Me.た = New ButtonUpDown
            Me.つ = New ButtonUpDown
            Me.て = New ButtonUpDown
            Me.ち = New ButtonUpDown
            Me.う = New ButtonUpDown
            Me.り = New ButtonUpDown
            Me.れ = New ButtonUpDown
            Me.る = New ButtonUpDown
            Me.ら = New ButtonUpDown
            Me.ろ = New ButtonUpDown
            Me.ほ = New ButtonUpDown
            Me.し = New ButtonUpDown
            Me.せ = New ButtonUpDown
            Me.す = New ButtonUpDown
            Me.さ = New ButtonUpDown
            Me.そ = New ButtonUpDown
            Me.く = New ButtonUpDown
            Me.は = New ButtonUpDown
            Me.ふ = New ButtonUpDown
            Me.へ = New ButtonUpDown
            Me.ひ = New ButtonUpDown
            Me.い = New ButtonUpDown
            Me.こ = New ButtonUpDown
            Me.え = New ButtonUpDown

            'PanKana
            '
            Me.Controls.Add(Me.お)
            Me.Controls.Add(Me.を)
            Me.Controls.Add(Me.に)
            Me.Controls.Add(Me.ね)
            Me.Controls.Add(Me.ぬ)
            Me.Controls.Add(Me.な)
            Me.Controls.Add(Me.の)
            Me.Controls.Add(Me.と)
            Me.Controls.Add(Me.あ)
            Me.Controls.Add(Me.ゆ)
            Me.Controls.Add(Me.よ)
            Me.Controls.Add(Me.き)
            Me.Controls.Add(Me.ん)
            Me.Controls.Add(Me.や)
            Me.Controls.Add(Me.み)
            Me.Controls.Add(Me.め)
            Me.Controls.Add(Me.む)
            Me.Controls.Add(Me.ま)
            Me.Controls.Add(Me.も)
            Me.Controls.Add(Me.わ)
            Me.Controls.Add(Me.か)
            Me.Controls.Add(Me.け)
            Me.Controls.Add(Me.た)
            Me.Controls.Add(Me.つ)
            Me.Controls.Add(Me.て)
            Me.Controls.Add(Me.ち)
            Me.Controls.Add(Me.う)
            Me.Controls.Add(Me.り)
            Me.Controls.Add(Me.れ)
            Me.Controls.Add(Me.る)
            Me.Controls.Add(Me.ら)
            Me.Controls.Add(Me.ろ)
            Me.Controls.Add(Me.ほ)
            Me.Controls.Add(Me.し)
            Me.Controls.Add(Me.せ)
            Me.Controls.Add(Me.す)
            Me.Controls.Add(Me.さ)
            Me.Controls.Add(Me.そ)
            Me.Controls.Add(Me.く)
            Me.Controls.Add(Me.は)
            Me.Controls.Add(Me.ふ)
            Me.Controls.Add(Me.へ)
            Me.Controls.Add(Me.ひ)
            Me.Controls.Add(Me.い)
            Me.Controls.Add(Me.こ)
            Me.Controls.Add(Me.え)
            Me.Font = New System.Drawing.Font("MS UI Gothic", 11.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
            Me.ForeColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer))
            Me.Location = New System.Drawing.Point(67, 51)
            Me.Name = "PanKana"
            Me.Size = New System.Drawing.Size(288, 152)
            Me.TabIndex = 4
            Me.TabStop = False
            Me.Text = "行検索 文字をクリックしてください"
            '
            'お
            '
            Me.お.Cursor = System.Windows.Forms.Cursors.Hand
            Me.お.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control
            Me.お.FlatStyle = System.Windows.Forms.FlatStyle.Flat
            Me.お.Font = New System.Drawing.Font("MS UI Gothic", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
            Me.お.ForeColor = System.Drawing.Color.Navy
            Me.お.Location = New System.Drawing.Point(16, 120)
            Me.お.Name = "お"
            Me.お.Size = New System.Drawing.Size(24, 26)
            Me.お.TabIndex = 50
            Me.お.Text = "お"
            '
            'を
            '
            Me.を.Cursor = System.Windows.Forms.Cursors.Hand
            Me.を.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control
            Me.を.FlatStyle = System.Windows.Forms.FlatStyle.Flat
            Me.を.Font = New System.Drawing.Font("MS UI Gothic", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
            Me.を.ForeColor = System.Drawing.Color.Navy
            Me.を.Location = New System.Drawing.Point(232, 120)
            Me.を.Name = "を"
            Me.を.Size = New System.Drawing.Size(24, 26)
            Me.を.TabIndex = 59
            Me.を.Text = "を"
            '
            'に
            '
            Me.に.Cursor = System.Windows.Forms.Cursors.Hand
            Me.に.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control
            Me.に.FlatStyle = System.Windows.Forms.FlatStyle.Flat
            Me.に.Font = New System.Drawing.Font("MS UI Gothic", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
            Me.に.ForeColor = System.Drawing.Color.Navy
            Me.に.Location = New System.Drawing.Point(112, 48)
            Me.に.Name = "に"
            Me.に.Size = New System.Drawing.Size(24, 26)
            Me.に.TabIndex = 24
            Me.に.Text = "に"
            '
            'ね
            '
            Me.ね.Cursor = System.Windows.Forms.Cursors.Hand
            Me.ね.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control
            Me.ね.FlatStyle = System.Windows.Forms.FlatStyle.Flat
            Me.ね.Font = New System.Drawing.Font("MS UI Gothic", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
            Me.ね.ForeColor = System.Drawing.Color.Navy
            Me.ね.Location = New System.Drawing.Point(112, 96)
            Me.ね.Name = "ね"
            Me.ね.Size = New System.Drawing.Size(24, 26)
            Me.ね.TabIndex = 44
            Me.ね.Text = "ね"
            '
            'ぬ
            '
            Me.ぬ.Cursor = System.Windows.Forms.Cursors.Hand
            Me.ぬ.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control
            Me.ぬ.FlatStyle = System.Windows.Forms.FlatStyle.Flat
            Me.ぬ.Font = New System.Drawing.Font("MS UI Gothic", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
            Me.ぬ.ForeColor = System.Drawing.Color.Navy
            Me.ぬ.Location = New System.Drawing.Point(112, 72)
            Me.ぬ.Name = "ぬ"
            Me.ぬ.Size = New System.Drawing.Size(24, 26)
            Me.ぬ.TabIndex = 34
            Me.ぬ.Text = "ぬ"
            '
            'な
            '
            Me.な.Cursor = System.Windows.Forms.Cursors.Hand
            Me.な.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control
            Me.な.FlatStyle = System.Windows.Forms.FlatStyle.Flat
            Me.な.Font = New System.Drawing.Font("MS UI Gothic", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
            Me.な.ForeColor = System.Drawing.Color.Navy
            Me.な.Location = New System.Drawing.Point(112, 24)
            Me.な.Name = "な"
            Me.な.Size = New System.Drawing.Size(24, 26)
            Me.な.TabIndex = 14
            Me.な.Text = "な"
            '
            'の
            '
            Me.の.Cursor = System.Windows.Forms.Cursors.Hand
            Me.の.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control
            Me.の.FlatStyle = System.Windows.Forms.FlatStyle.Flat
            Me.の.Font = New System.Drawing.Font("MS UI Gothic", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
            Me.の.ForeColor = System.Drawing.Color.Navy
            Me.の.Location = New System.Drawing.Point(112, 120)
            Me.の.Name = "の"
            Me.の.Size = New System.Drawing.Size(24, 26)
            Me.の.TabIndex = 54
            Me.の.Text = "の"
            '
            'と
            '
            Me.と.Cursor = System.Windows.Forms.Cursors.Hand
            Me.と.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control
            Me.と.FlatStyle = System.Windows.Forms.FlatStyle.Flat
            Me.と.Font = New System.Drawing.Font("MS UI Gothic", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
            Me.と.ForeColor = System.Drawing.Color.Navy
            Me.と.Location = New System.Drawing.Point(88, 120)
            Me.と.Name = "と"
            Me.と.Size = New System.Drawing.Size(24, 26)
            Me.と.TabIndex = 53
            Me.と.Text = "と"
            '
            'あ
            '
            Me.あ.Cursor = System.Windows.Forms.Cursors.Hand
            Me.あ.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control
            Me.あ.FlatStyle = System.Windows.Forms.FlatStyle.Flat
            Me.あ.Font = New System.Drawing.Font("MS UI Gothic", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
            Me.あ.ForeColor = System.Drawing.Color.Navy
            Me.あ.Location = New System.Drawing.Point(16, 24)
            Me.あ.Name = "あ"
            Me.あ.Size = New System.Drawing.Size(24, 26)
            Me.あ.TabIndex = 10
            Me.あ.Text = "あ"
            '
            'ゆ
            '
            Me.ゆ.Cursor = System.Windows.Forms.Cursors.Hand
            Me.ゆ.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control
            Me.ゆ.FlatStyle = System.Windows.Forms.FlatStyle.Flat
            Me.ゆ.Font = New System.Drawing.Font("MS UI Gothic", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
            Me.ゆ.ForeColor = System.Drawing.Color.Navy
            Me.ゆ.Location = New System.Drawing.Point(184, 72)
            Me.ゆ.Name = "ゆ"
            Me.ゆ.Size = New System.Drawing.Size(24, 26)
            Me.ゆ.TabIndex = 37
            Me.ゆ.Text = "ゆ"
            '
            'よ
            '
            Me.よ.Cursor = System.Windows.Forms.Cursors.Hand
            Me.よ.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control
            Me.よ.FlatStyle = System.Windows.Forms.FlatStyle.Flat
            Me.よ.Font = New System.Drawing.Font("MS UI Gothic", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
            Me.よ.ForeColor = System.Drawing.Color.Navy
            Me.よ.Location = New System.Drawing.Point(184, 120)
            Me.よ.Name = "よ"
            Me.よ.Size = New System.Drawing.Size(24, 26)
            Me.よ.TabIndex = 57
            Me.よ.Text = "よ"
            '
            'き
            '
            Me.き.Cursor = System.Windows.Forms.Cursors.Hand
            Me.き.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control
            Me.き.FlatStyle = System.Windows.Forms.FlatStyle.Flat
            Me.き.Font = New System.Drawing.Font("MS UI Gothic", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
            Me.き.ForeColor = System.Drawing.Color.Navy
            Me.き.Location = New System.Drawing.Point(40, 48)
            Me.き.Name = "き"
            Me.き.Size = New System.Drawing.Size(24, 26)
            Me.き.TabIndex = 21
            Me.き.Text = "き"
            '
            'ん
            '
            Me.ん.Cursor = System.Windows.Forms.Cursors.Hand
            Me.ん.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control
            Me.ん.FlatStyle = System.Windows.Forms.FlatStyle.Flat
            Me.ん.Font = New System.Drawing.Font("MS UI Gothic", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
            Me.ん.ForeColor = System.Drawing.Color.Navy
            Me.ん.Location = New System.Drawing.Point(256, 120)
            Me.ん.Name = "ん"
            Me.ん.Size = New System.Drawing.Size(24, 26)
            Me.ん.TabIndex = 60
            Me.ん.Text = "ん"
            '
            'や
            '
            Me.や.Cursor = System.Windows.Forms.Cursors.Hand
            Me.や.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control
            Me.や.FlatStyle = System.Windows.Forms.FlatStyle.Flat
            Me.や.Font = New System.Drawing.Font("MS UI Gothic", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
            Me.や.ForeColor = System.Drawing.Color.Navy
            Me.や.Location = New System.Drawing.Point(184, 24)
            Me.や.Name = "や"
            Me.や.Size = New System.Drawing.Size(24, 26)
            Me.や.TabIndex = 17
            Me.や.Text = "や"
            '
            'み
            '
            Me.み.Cursor = System.Windows.Forms.Cursors.Hand
            Me.み.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control
            Me.み.FlatStyle = System.Windows.Forms.FlatStyle.Flat
            Me.み.Font = New System.Drawing.Font("MS UI Gothic", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
            Me.み.ForeColor = System.Drawing.Color.Navy
            Me.み.Location = New System.Drawing.Point(160, 48)
            Me.み.Name = "み"
            Me.み.Size = New System.Drawing.Size(24, 26)
            Me.み.TabIndex = 26
            Me.み.Text = "み"
            '
            'め
            '
            Me.め.Cursor = System.Windows.Forms.Cursors.Hand
            Me.め.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control
            Me.め.FlatStyle = System.Windows.Forms.FlatStyle.Flat
            Me.め.Font = New System.Drawing.Font("MS UI Gothic", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
            Me.め.ForeColor = System.Drawing.Color.Navy
            Me.め.Location = New System.Drawing.Point(160, 96)
            Me.め.Name = "め"
            Me.め.Size = New System.Drawing.Size(24, 26)
            Me.め.TabIndex = 46
            Me.め.Text = "め"
            '
            'む
            '
            Me.む.Cursor = System.Windows.Forms.Cursors.Hand
            Me.む.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control
            Me.む.FlatStyle = System.Windows.Forms.FlatStyle.Flat
            Me.む.Font = New System.Drawing.Font("MS UI Gothic", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
            Me.む.ForeColor = System.Drawing.Color.Navy
            Me.む.Location = New System.Drawing.Point(160, 72)
            Me.む.Name = "む"
            Me.む.Size = New System.Drawing.Size(24, 26)
            Me.む.TabIndex = 36
            Me.む.Text = "む"
            '
            'ま
            '
            Me.ま.Cursor = System.Windows.Forms.Cursors.Hand
            Me.ま.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control
            Me.ま.FlatStyle = System.Windows.Forms.FlatStyle.Flat
            Me.ま.Font = New System.Drawing.Font("MS UI Gothic", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
            Me.ま.ForeColor = System.Drawing.Color.Navy
            Me.ま.Location = New System.Drawing.Point(160, 24)
            Me.ま.Name = "ま"
            Me.ま.Size = New System.Drawing.Size(24, 26)
            Me.ま.TabIndex = 16
            Me.ま.Text = "ま"
            '
            'も
            '
            Me.も.Cursor = System.Windows.Forms.Cursors.Hand
            Me.も.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control
            Me.も.FlatStyle = System.Windows.Forms.FlatStyle.Flat
            Me.も.Font = New System.Drawing.Font("MS UI Gothic", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
            Me.も.ForeColor = System.Drawing.Color.Navy
            Me.も.Location = New System.Drawing.Point(160, 120)
            Me.も.Name = "も"
            Me.も.Size = New System.Drawing.Size(24, 26)
            Me.も.TabIndex = 56
            Me.も.Text = "も"
            '
            'わ
            '
            Me.わ.Cursor = System.Windows.Forms.Cursors.Hand
            Me.わ.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control
            Me.わ.FlatStyle = System.Windows.Forms.FlatStyle.Flat
            Me.わ.Font = New System.Drawing.Font("MS UI Gothic", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
            Me.わ.ForeColor = System.Drawing.Color.Navy
            Me.わ.Location = New System.Drawing.Point(232, 24)
            Me.わ.Name = "わ"
            Me.わ.Size = New System.Drawing.Size(24, 26)
            Me.わ.TabIndex = 19
            Me.わ.Text = "わ"
            '
            'か
            '
            Me.か.Cursor = System.Windows.Forms.Cursors.Hand
            Me.か.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control
            Me.か.FlatStyle = System.Windows.Forms.FlatStyle.Flat
            Me.か.Font = New System.Drawing.Font("MS UI Gothic", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
            Me.か.ForeColor = System.Drawing.Color.Navy
            Me.か.Location = New System.Drawing.Point(40, 24)
            Me.か.Name = "か"
            Me.か.Size = New System.Drawing.Size(24, 26)
            Me.か.TabIndex = 11
            Me.か.Text = "か"
            '
            'け
            '
            Me.け.Cursor = System.Windows.Forms.Cursors.Hand
            Me.け.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control
            Me.け.FlatStyle = System.Windows.Forms.FlatStyle.Flat
            Me.け.Font = New System.Drawing.Font("MS UI Gothic", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
            Me.け.ForeColor = System.Drawing.Color.Navy
            Me.け.Location = New System.Drawing.Point(40, 96)
            Me.け.Name = "け"
            Me.け.Size = New System.Drawing.Size(24, 26)
            Me.け.TabIndex = 41
            Me.け.Text = "け"
            '
            'た
            '
            Me.た.Cursor = System.Windows.Forms.Cursors.Hand
            Me.た.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control
            Me.た.FlatStyle = System.Windows.Forms.FlatStyle.Flat
            Me.た.Font = New System.Drawing.Font("MS UI Gothic", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
            Me.た.ForeColor = System.Drawing.Color.Navy
            Me.た.Location = New System.Drawing.Point(88, 24)
            Me.た.Name = "た"
            Me.た.Size = New System.Drawing.Size(24, 26)
            Me.た.TabIndex = 13
            Me.た.Text = "た"
            '
            'つ
            '
            Me.つ.Cursor = System.Windows.Forms.Cursors.Hand
            Me.つ.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control
            Me.つ.FlatStyle = System.Windows.Forms.FlatStyle.Flat
            Me.つ.Font = New System.Drawing.Font("MS UI Gothic", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
            Me.つ.ForeColor = System.Drawing.Color.Navy
            Me.つ.Location = New System.Drawing.Point(88, 72)
            Me.つ.Name = "つ"
            Me.つ.Size = New System.Drawing.Size(24, 26)
            Me.つ.TabIndex = 33
            Me.つ.Text = "つ"
            '
            'て
            '
            Me.て.Cursor = System.Windows.Forms.Cursors.Hand
            Me.て.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control
            Me.て.FlatStyle = System.Windows.Forms.FlatStyle.Flat
            Me.て.Font = New System.Drawing.Font("MS UI Gothic", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
            Me.て.ForeColor = System.Drawing.Color.Navy
            Me.て.Location = New System.Drawing.Point(88, 96)
            Me.て.Name = "て"
            Me.て.Size = New System.Drawing.Size(24, 26)
            Me.て.TabIndex = 43
            Me.て.Text = "て"
            '
            'ち
            '
            Me.ち.Cursor = System.Windows.Forms.Cursors.Hand
            Me.ち.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control
            Me.ち.FlatStyle = System.Windows.Forms.FlatStyle.Flat
            Me.ち.Font = New System.Drawing.Font("MS UI Gothic", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
            Me.ち.ForeColor = System.Drawing.Color.Navy
            Me.ち.Location = New System.Drawing.Point(88, 48)
            Me.ち.Name = "ち"
            Me.ち.Size = New System.Drawing.Size(24, 26)
            Me.ち.TabIndex = 23
            Me.ち.Text = "ち"
            '
            'う
            '
            Me.う.Cursor = System.Windows.Forms.Cursors.Hand
            Me.う.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control
            Me.う.FlatStyle = System.Windows.Forms.FlatStyle.Flat
            Me.う.Font = New System.Drawing.Font("MS UI Gothic", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
            Me.う.ForeColor = System.Drawing.Color.Navy
            Me.う.Location = New System.Drawing.Point(16, 72)
            Me.う.Name = "う"
            Me.う.Size = New System.Drawing.Size(24, 26)
            Me.う.TabIndex = 30
            Me.う.Text = "う"
            '
            'り
            '
            Me.り.Cursor = System.Windows.Forms.Cursors.Hand
            Me.り.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control
            Me.り.FlatStyle = System.Windows.Forms.FlatStyle.Flat
            Me.り.Font = New System.Drawing.Font("MS UI Gothic", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
            Me.り.ForeColor = System.Drawing.Color.Navy
            Me.り.Location = New System.Drawing.Point(208, 48)
            Me.り.Name = "り"
            Me.り.Size = New System.Drawing.Size(24, 26)
            Me.り.TabIndex = 28
            Me.り.Text = "り"
            '
            'れ
            '
            Me.れ.Cursor = System.Windows.Forms.Cursors.Hand
            Me.れ.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control
            Me.れ.FlatStyle = System.Windows.Forms.FlatStyle.Flat
            Me.れ.Font = New System.Drawing.Font("MS UI Gothic", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
            Me.れ.ForeColor = System.Drawing.Color.Navy
            Me.れ.Location = New System.Drawing.Point(208, 96)
            Me.れ.Name = "れ"
            Me.れ.Size = New System.Drawing.Size(24, 26)
            Me.れ.TabIndex = 48
            Me.れ.Text = "れ"
            '
            'る
            '
            Me.る.Cursor = System.Windows.Forms.Cursors.Hand
            Me.る.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control
            Me.る.FlatStyle = System.Windows.Forms.FlatStyle.Flat
            Me.る.Font = New System.Drawing.Font("MS UI Gothic", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
            Me.る.ForeColor = System.Drawing.Color.Navy
            Me.る.Location = New System.Drawing.Point(208, 72)
            Me.る.Name = "る"
            Me.る.Size = New System.Drawing.Size(24, 26)
            Me.る.TabIndex = 38
            Me.る.Text = "る"
            '
            'ら
            '
            Me.ら.Cursor = System.Windows.Forms.Cursors.Hand
            Me.ら.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control
            Me.ら.FlatStyle = System.Windows.Forms.FlatStyle.Flat
            Me.ら.Font = New System.Drawing.Font("MS UI Gothic", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
            Me.ら.ForeColor = System.Drawing.Color.Navy
            Me.ら.Location = New System.Drawing.Point(208, 24)
            Me.ら.Name = "ら"
            Me.ら.Size = New System.Drawing.Size(24, 26)
            Me.ら.TabIndex = 18
            Me.ら.Text = "ら"
            '
            'ろ
            '
            Me.ろ.Cursor = System.Windows.Forms.Cursors.Hand
            Me.ろ.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control
            Me.ろ.FlatStyle = System.Windows.Forms.FlatStyle.Flat
            Me.ろ.Font = New System.Drawing.Font("MS UI Gothic", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
            Me.ろ.ForeColor = System.Drawing.Color.Navy
            Me.ろ.Location = New System.Drawing.Point(208, 120)
            Me.ろ.Name = "ろ"
            Me.ろ.Size = New System.Drawing.Size(24, 26)
            Me.ろ.TabIndex = 58
            Me.ろ.Text = "ろ"
            '
            'ほ
            '
            Me.ほ.Cursor = System.Windows.Forms.Cursors.Hand
            Me.ほ.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control
            Me.ほ.FlatStyle = System.Windows.Forms.FlatStyle.Flat
            Me.ほ.Font = New System.Drawing.Font("MS UI Gothic", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
            Me.ほ.ForeColor = System.Drawing.Color.Navy
            Me.ほ.Location = New System.Drawing.Point(136, 120)
            Me.ほ.Name = "ほ"
            Me.ほ.Size = New System.Drawing.Size(24, 26)
            Me.ほ.TabIndex = 55
            Me.ほ.Text = "ほ"
            '
            'し
            '
            Me.し.Cursor = System.Windows.Forms.Cursors.Hand
            Me.し.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control
            Me.し.FlatStyle = System.Windows.Forms.FlatStyle.Flat
            Me.し.Font = New System.Drawing.Font("MS UI Gothic", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
            Me.し.ForeColor = System.Drawing.Color.Navy
            Me.し.Location = New System.Drawing.Point(64, 48)
            Me.し.Name = "し"
            Me.し.Size = New System.Drawing.Size(24, 26)
            Me.し.TabIndex = 22
            Me.し.Text = "し"
            '
            'せ
            '
            Me.せ.Cursor = System.Windows.Forms.Cursors.Hand
            Me.せ.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control
            Me.せ.FlatStyle = System.Windows.Forms.FlatStyle.Flat
            Me.せ.Font = New System.Drawing.Font("MS UI Gothic", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
            Me.せ.ForeColor = System.Drawing.Color.Navy
            Me.せ.Location = New System.Drawing.Point(64, 96)
            Me.せ.Name = "せ"
            Me.せ.Size = New System.Drawing.Size(24, 26)
            Me.せ.TabIndex = 42
            Me.せ.Text = "せ"
            '
            'す
            '
            Me.す.Cursor = System.Windows.Forms.Cursors.Hand
            Me.す.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control
            Me.す.FlatStyle = System.Windows.Forms.FlatStyle.Flat
            Me.す.Font = New System.Drawing.Font("MS UI Gothic", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
            Me.す.ForeColor = System.Drawing.Color.Navy
            Me.す.Location = New System.Drawing.Point(64, 72)
            Me.す.Name = "す"
            Me.す.Size = New System.Drawing.Size(24, 26)
            Me.す.TabIndex = 32
            Me.す.Text = "す"
            '
            'さ
            '
            Me.さ.Cursor = System.Windows.Forms.Cursors.Hand
            Me.さ.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control
            Me.さ.FlatStyle = System.Windows.Forms.FlatStyle.Flat
            Me.さ.Font = New System.Drawing.Font("MS UI Gothic", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
            Me.さ.ForeColor = System.Drawing.Color.Navy
            Me.さ.Location = New System.Drawing.Point(64, 24)
            Me.さ.Name = "さ"
            Me.さ.Size = New System.Drawing.Size(24, 26)
            Me.さ.TabIndex = 12
            Me.さ.Text = "さ"
            '
            'そ
            '
            Me.そ.Cursor = System.Windows.Forms.Cursors.Hand
            Me.そ.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control
            Me.そ.FlatStyle = System.Windows.Forms.FlatStyle.Flat
            Me.そ.Font = New System.Drawing.Font("MS UI Gothic", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
            Me.そ.ForeColor = System.Drawing.Color.Navy
            Me.そ.Location = New System.Drawing.Point(64, 120)
            Me.そ.Name = "そ"
            Me.そ.Size = New System.Drawing.Size(24, 26)
            Me.そ.TabIndex = 52
            Me.そ.Text = "そ"
            '
            'く
            '
            Me.く.Cursor = System.Windows.Forms.Cursors.Hand
            Me.く.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control
            Me.く.FlatStyle = System.Windows.Forms.FlatStyle.Flat
            Me.く.Font = New System.Drawing.Font("MS UI Gothic", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
            Me.く.ForeColor = System.Drawing.Color.Navy
            Me.く.Location = New System.Drawing.Point(40, 72)
            Me.く.Name = "く"
            Me.く.Size = New System.Drawing.Size(24, 26)
            Me.く.TabIndex = 31
            Me.く.Text = "く"
            '
            'は
            '
            Me.は.Cursor = System.Windows.Forms.Cursors.Hand
            Me.は.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control
            Me.は.FlatStyle = System.Windows.Forms.FlatStyle.Flat
            Me.は.Font = New System.Drawing.Font("MS UI Gothic", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
            Me.は.ForeColor = System.Drawing.Color.Navy
            Me.は.Location = New System.Drawing.Point(136, 24)
            Me.は.Name = "は"
            Me.は.Size = New System.Drawing.Size(24, 26)
            Me.は.TabIndex = 15
            Me.は.Text = "は"
            '
            'ふ
            '
            Me.ふ.Cursor = System.Windows.Forms.Cursors.Hand
            Me.ふ.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control
            Me.ふ.FlatStyle = System.Windows.Forms.FlatStyle.Flat
            Me.ふ.Font = New System.Drawing.Font("MS UI Gothic", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
            Me.ふ.ForeColor = System.Drawing.Color.Navy
            Me.ふ.Location = New System.Drawing.Point(136, 72)
            Me.ふ.Name = "ふ"
            Me.ふ.Size = New System.Drawing.Size(24, 26)
            Me.ふ.TabIndex = 35
            Me.ふ.Text = "ふ"
            '
            'へ
            '
            Me.へ.Cursor = System.Windows.Forms.Cursors.Hand
            Me.へ.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control
            Me.へ.FlatStyle = System.Windows.Forms.FlatStyle.Flat
            Me.へ.Font = New System.Drawing.Font("MS UI Gothic", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
            Me.へ.ForeColor = System.Drawing.Color.Navy
            Me.へ.Location = New System.Drawing.Point(136, 96)
            Me.へ.Name = "へ"
            Me.へ.Size = New System.Drawing.Size(24, 26)
            Me.へ.TabIndex = 45
            Me.へ.Text = "へ"
            '
            'ひ
            '
            Me.ひ.Cursor = System.Windows.Forms.Cursors.Hand
            Me.ひ.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control
            Me.ひ.FlatStyle = System.Windows.Forms.FlatStyle.Flat
            Me.ひ.Font = New System.Drawing.Font("MS UI Gothic", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
            Me.ひ.ForeColor = System.Drawing.Color.Navy
            Me.ひ.Location = New System.Drawing.Point(136, 48)
            Me.ひ.Name = "ひ"
            Me.ひ.Size = New System.Drawing.Size(24, 26)
            Me.ひ.TabIndex = 25
            Me.ひ.Text = "ひ"
            '
            'い
            '
            Me.い.Cursor = System.Windows.Forms.Cursors.Hand
            Me.い.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control
            Me.い.FlatStyle = System.Windows.Forms.FlatStyle.Flat
            Me.い.Font = New System.Drawing.Font("MS UI Gothic", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
            Me.い.ForeColor = System.Drawing.Color.Navy
            Me.い.Location = New System.Drawing.Point(16, 48)
            Me.い.Name = "い"
            Me.い.Size = New System.Drawing.Size(24, 26)
            Me.い.TabIndex = 20
            Me.い.Text = "い"
            '
            'こ
            '
            Me.こ.Cursor = System.Windows.Forms.Cursors.Hand
            Me.こ.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control
            Me.こ.FlatStyle = System.Windows.Forms.FlatStyle.Flat
            Me.こ.Font = New System.Drawing.Font("MS UI Gothic", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
            Me.こ.ForeColor = System.Drawing.Color.Navy
            Me.こ.Location = New System.Drawing.Point(40, 120)
            Me.こ.Name = "こ"
            Me.こ.Size = New System.Drawing.Size(24, 26)
            Me.こ.TabIndex = 51
            Me.こ.Text = "こ"
            '
            'え
            '
            Me.え.Cursor = System.Windows.Forms.Cursors.Hand
            Me.え.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control
            Me.え.FlatStyle = System.Windows.Forms.FlatStyle.Flat
            Me.え.Font = New System.Drawing.Font("MS UI Gothic", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(128, Byte))
            Me.え.ForeColor = System.Drawing.Color.Navy
            Me.え.Location = New System.Drawing.Point(16, 96)
            Me.え.Name = "え"
            Me.え.Size = New System.Drawing.Size(24, 26)
            Me.え.TabIndex = 40
            Me.え.Text = "え"

            For Each c As Control In Me.Controls
                If c.GetType Is GetType(ButtonUpDown) Then
                    AddHandler c.Leave, AddressOf かな_lerve
                    AddHandler c.Enter, AddressOf かな_Enter
                    AddHandler c.Click, AddressOf かな_Click
                    AddHandler c.KeyDown, AddressOf かな_KeyDown

                End If
            Next
            pKasira = Me.あ
        End Sub

    #End Region

        Public pVal As String
        <System.ComponentModel.Category("カスタム")> _
        <System.ComponentModel.Description("選択した値")> _
        Public Property Val() As String
            Get
                Return pVal
            End Get
            Set(ByVal value As String)
                pVal = value
            End Set
        End Property
        Public pKasira As Button
        <System.ComponentModel.Category("カスタム")> _
        <System.ComponentModel.Description("最初に選択されるボタン")> _
        Public Property Kasira() As Button
            Get
                Return pKasira
            End Get
            Set(ByVal value As Button)
                pKasira = value
            End Set
        End Property


        Private Sub かな_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs)
            Dim ta As Integer
            Select Case True
                Case e.KeyCode = 38
                    ta = CType(sender, ButtonUpDown).TabIndex - 10
                    If ta >= 10 Then
                        Dim ok As Boolean
                        Do
                            ok = FocusSet(ta)
                            If ok = True Then Exit Do
                            ta -= 10
                        Loop Until ok = True
                    End If
                Case e.KeyCode = 40
                    ta = CType(sender, ButtonUpDown).TabIndex + 10
                    If ta <= 60 Then
                        Dim ok As Boolean
                        Do
                            ok = FocusSet(ta)
                            If ok = True Then Exit Do
                            ta += 10
                        Loop Until ok = True
                    End If
            End Select
        End Sub

        Private Function FocusSet(ByVal ind As Integer) As Boolean
            FocusSet = False
            For Each c As Control In Me.Controls
                If c.GetType Is GetType(ButtonUpDown) Then
                    If CType(c, ButtonUpDown).TabIndex = ind Then
                        c.Focus()
                        Return True
                    End If
                End If
            Next
        End Function
        Private Sub かな_lerve(ByVal sender As System.Object, ByVal e As System.EventArgs)
            Dim kan As button = CType(sender, button)
            kan.ForeColor = Color.Navy

        End Sub
        Private Sub かな_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs)
            Dim kan As button = CType(sender, button)
            kan.ForeColor = Color.Red

        End Sub
        Private Sub かな_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
            Val = CType(sender, Button).Name
            Kasira = CType(sender, Button)
            RaiseEvent eeVal()
        End Sub

        Private Sub aaKanaPanel_VisibleChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.VisibleChanged
            If Me.Visible = True Then
                If Not pKasira Is Nothing Then pKasira.Focus()
            End If
        End Sub
    End Class
    Public Class ButtonUpDown
        Inherits Button
        Protected Overrides Function IsInputKey(ByVal keyData As Keys) As Boolean
            Select Case True
                Case keyData = 38
                    Return True
                Case keyData = 40
                    Return True
            End Select
        End Function
    End Class

     

     

     

     

     

     

     

    2006年11月3日 6:19
  •  追伸

    もし DataGridViewの中のコントロールに連動させる必要がなければ 最初に書いたコードは無視してください
    読み返してみると DataGridViewの中に出現する必要は無さそうなので・・・

     あとは 下に書いたコードをコピペしたクラスを作り ツールボックスアイテムに追加してください

     そして クリックするとeeVal というイベントが発生しますので 

         Private Sub AaKanaPanel1_eeVal() Handles AaKanaPanel1.eeVal
            Dim aa As String = AaKanaPanel1.Val
            MsgBox(aa)

        ’ここに こんな感じで 好きなメソッドを入れてください
         End Sub

       Val というプロパティで 選んだカナが出てきます。

     

    2006年11月3日 12:02
  • 返信ありがとうございます。たくさんコードを書いていただいてありがとうございました。

    さっそくツールボックスに追加しました。ツールボックスってアイテムが追加できるんですね。知らなかったのでとても勉強になります。今から使うのが楽しみです!

    連休明けからコードを書いて色々試してみたいと思います。親切にしていただいてありがとうございました。またご報告させていただきます。

     

    2006年11月3日 14:09