I am trying to:
- My settings from my stores in the combo box (Databases do not matter, but suggestions are needed).
- To fill a ComboBox on these items to retrieve the formload.
- Also display these items (per 1 item line) in the text box, where I can edit and save, both for My.Settings and ComboBox.
I am losing a bit, how should I go about doing this?
Existing code:
Private Sub Form1_Load (ByVal Handles this System.Object, as inVal e System.EventArgs) MyBase.Load Labels.LoadSettings ( ) TxtNumOfLabels.Text = Labels.numOfLabels cboItem.Items.Clear () String (s) in each Labels.items cboItem.Items.Add the next end as to the Sub-New Specialized.StringCollection Shared Shared Load Loadings as Folk Share Try the item () items =) Try My.Settings ("item") Pre-Exception Try Exception (ex.Message, MsgBoxStyle.Exclamation) as MsgBox End Sub Personal Sub Options_Load (ByVal as the object Handle Me.Load as ByVal E System.EventArgs .items txtItems.AppendText (s + Environment.NewLine) in the label for each string as the next end sub-private all BTNSSclic (ByVal sender as System Object, System.EventArgs as ByVal e.) btnSave.Dig itemCollection as new specific. StringCollection TxtItems.Lines itemCollection.Add (s) in the string as each next me. Settings ("item") = MySettings.Save MySettings.Save (Labels.LoadSettings) Form1.cb oItem.Items.Clear () String Labels.items Form1.cboItem.Items.Add (for each) Next Me .close () is in the form of End Subbut won this code to save values properly, or they were shown or displayed properly in the text box.
"itemprop =" text ">You can use a StringCollection type for your setting, if you have the string selection available For your code, the following import statement may be needed:
Import System.Command. SpecializedThen you can use this string combination to dosource for kickboxes.
Edit: Your code has seen that you are already using string collation. good. Why can not you access your settings like this now?
My.Settings.Items = itemCollectionThis way you are not sure typing mistake, and you are also making sure that you are actually Exist in Also, do you try to take action through code to check that your setting is actually saved or not?
Comments
Post a Comment