いくつかの静的contextmenustrip
アイテムを使用して、次のようにデータベースから動的に追加のアイテムを作成します。
reader = cmd.ExecuteReader()
If reader.HasRows Then Arh_ContextMenuStrip.Items.Add("-", Nothing, Nothing)
While (reader.Read())
If CStr(reader.GetValue(0)).Length = 17 And Not CStr(reader.GetValue(0)) = mydatabase Then
Arh_ContextMenuStrip.Items.Add(CStr(reader.GetValue(0)), Nothing, AddressOf myHandler_Click)
'How to set font "Courier New" for this item?
'How to set tooltip for this item?
End If
End While
質問は、そのようなアイテムに「Courier New」などの異なるフォントを設定し、そのようなアイテムごとにツールチップ テキストを追加する方法を教えてください。これは、これらのアイテムにプロポーショナル フォントが必要になるためです。