none
Create entries history w/ DropDown Function (e.g. Combobox, List, ListView, or other) from User Inputs in Different Background Solutions RRS feed

  • Question

  • I am presently developing a Windows Form App in VB.NET (not a console app) utilizing Visual Studio 2017. It's been a long time since I've developed an app so I am a bit rusty and would appreciate assistance.

    I spent a couple days scouring dozens of Development websites. I can find all kinds of general information on classes, methods, and sample code binding multiple variables and lists together, etc., but still didn't find the information I need.

    Most of my form and functions I have already put together.

    There is one element that I would appreciate some assistance with:

    Objective
    This is what I'm trying to accomplish.
    I'd like to use a richtextbox (could use a combobox, or other control) but I like the formatting ability of the richtextbox as an input box to:

    *   Allow user to enter a string (no length requirement)

    *   After string is typed, upon pressing the ENTER key to add the string to a list of entries (history) with the most recent first in the list (eg. Last In First Out LIFO).

    *  Set properties so that only the 20 most recent entries appear in the drop down.

     List of entries only appears when user clicks on the drop down arrow OR presses the down arrow key.

    *  Continue allowing user to enter strings until user closes the form.

    *  I would probably like to store the list of entries so they're available the next time the app runs. 

    (I assume this is automatically done as long as the variable is not cleared. I also assume that the variable should not be declared as new each time form opens.)

    Pseudo Code

    Pseudo code would be something like this.

    'Get User_Inputs as String From RichtextBox1 (no length restrictions). This could be Combobox or other if functionality is better.

    'Add Inputs to history in LIFO style accessible via drop down

    'Show history only when user presses ENTER or down_arrow key

    'Save history list for next instance of form.

    Solution Requests

    If you only have time to provide one solution, that's fine and completely appreciated.

    For learning purposes, if you have time I'd like to see this solution implemented in the following different ways:

    Solution1:

    Create LIFO solution for entries history utilizing Array, List(Of String), List View or similar control utilizing internal storage ability of system properties e.g. IList or ICollection.

    Solution2: 

    Create LIFO solution for entries history utilizing single column datatable or database.

    Solution3: 

    Create LIFO solution for entries history dynamically utilizing pointers or a stack.

    These will be a significant learning opportunity for me. God bless you and thanks in advance for your time and effort.

    With Much Respect,


    Tuesday, March 27, 2018 5:47 PM

All replies