Quantcast
Channel: Windows Forms General forum
Viewing all articles
Browse latest Browse all 12583

Save combobox selection in program

$
0
0
I have two combobox in a form with various names, which are stored in:

Option Strict On
Option Explicit On

Public Class Form1

     Private Sub Form1_Load (ByVal sender As System.Object, ByVal e As System.EventArgs) _Handles MyBase.Load

  If My.Settings.Combo1_Items Is Nothing Then
    My.Settings.Combo1_Items = New System.Collections.Specialized.StringCollection

Which code do I use for whenever I close the program, the last selection is saved and viewed the next time you open the program in the form?


Viewing all articles
Browse latest Browse all 12583

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>