Using Visual Basic .net (2003 or 2010)

  1. days leaper profile image80
    days leaperposted 4 years ago

    Using Visual Basic .net (2003 or 2010)

    Is there a way to save user input into RAM memory from a textbox etc. when the user goes to another form, then recall it in that textbox or rtf when the user goes back to that form?
    (from RAM mind, not disk space, that's easy)

  2. MysticPrince profile image76
    MysticPrinceposted 4 years ago

    Saving in RAM is easier. You have doing it all the time. Your program lies in the RAM itself. Simply assign the Text strings/Numeric Values from User Input to String/Integer variables, created by you. They remain in RAM as long as the variables live. Make them Global variables, declare them in the top, outside any routine, so that they remain as long as the program runs and you can reset those values in the form, when user comes back. If you want to save the values, even after program is closed, you must use Hard Disk memory. RAM is volatile memory.
    Assign the values to the variables, and they can be retrieved anytime. To simplify things, you can create a custom data structure, that can have primitives to hold the User Input. Create a new variable instance and assign values, when user leaves the form and restore values from variables, and fill the form, when user comes back.