|
分類:[VB.NET/VB2005 以降]
2019/03/12(Tue) 18:17:12 編集(投稿者) 2019/03/12(Tue) 18:13:37 編集(投稿者)
<pre><pre>Vistual Basicです。
ソースコード Imports System.ComponentModel Imports System.Globalization Public Class Foam3
Private ReadOnly list As New Dictionary(Of String, Integer) Private ReadOnly list1 As New Dictionary(Of String, Integer) Private ReadOnly list2 As New Dictionary(Of String, Integer) Private ReadOnly list3 As New Dictionary(Of String, Integer) Private ReadOnly list4 As New Dictionary(Of String, Integer) Private ReadOnly list5 As New Dictionary(Of String, Integer) Private ReadOnly list6 As New Dictionary(Of String, Integer) Private ReadOnly list7 As New Dictionary(Of String, Integer) Private ReadOnly list8 As New Dictionary(Of String, Integer) Private ReadOnly list9 As New Dictionary(Of String, Integer) Private ReadOnly list10 As New Dictionary(Of String, Integer) Private ReadOnly list11 As New Dictionary(Of String, Integer) Private ReadOnly list12 As New Dictionary(Of String, Integer) Private ReadOnly list13 As New Dictionary(Of String, Integer) Private ReadOnly list14 As New Dictionary(Of String, Integer) Private ReadOnly list15 As New Dictionary(Of String, Integer) Private ReadOnly list16 As New Dictionary(Of String, Integer) Private ReadOnly list17 As New Dictionary(Of String, Integer)
Private Sub Foam3_Load(sender As Object, e As EventArgs) Handles Me.Load list.add("a",0) list1.add("b",0) list2.add("c",0) list3.add("d",0) list4.add("e",0) list5.add("f",0) list6.add("g",0) list7.add("h",0) list8.add("i",0) list9.add("j",0) list10.add("k",0) list11.add("l",0) '省略 list17.add("r",0)
ComboBox1.DisplayMember = "key" ComboBox1.ValueMember = "value" ComboBox1.DataSource = New BindingSource(list, Nothing) ComboBox1.DropDownStyle = ComboBoxStyle.DropDownList end sub
'radiobutton使用
Private Sub R18_CheckedChanged(sender As Object, e As EventArgs) Handles R18.CheckedChanged If R18.Checked = True Then ComboBox1.DataSource = New BindingSource(list, list1, list2, list3, list4, list5, list6, list7, list8, list9, list10, list11, list12, list13, list14, list15, list16, list17, Nothing)
End If End Sub
コード全体です。
エラー場所 BindingSourceの部分で
エラー この引数の数を受け付ける 'New' がないため、オーバーロードの解決に失敗しました。
やりたい事、わからない事 ・list〜list17までをすべて表示させたいんですがエラーがでてしまい改善出来ません。 初心者ですのでお助け下さい。お願いします。
Vistualstudio2019 Vistual basic
</pre></pre>
|