3 Replies - 288 Views - Last Post: 13 May 2019 - 06:54 AM Rate Topic: -----

#1 Schwarzenegger   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 26
  • Joined: 20-February 07

exit program with or without saving data

Posted 12 May 2019 - 11:26 PM

I am writing a program in which the user can edit the text of one or more of a bunch of textboxes on a VB Form . The user can then select to save or not save the Form before exiting the program. How?
Is This A Good Question/Topic? 0
  • +

Replies To: exit program with or without saving data

#2 andrewsw   User is online

  • never lube your breaks
  • member icon

Reputation: 6807
  • View blog
  • Posts: 28,143
  • Joined: 12-December 12

Re: exit program with or without saving data

Posted 13 May 2019 - 12:02 AM

Is this for the (ancient and obsolete) VB6, or VB.NET?

You would not save a 'Form', you would save the data from the form. It is up-to you where you would store this data: a text file, XML, to a database, etc..
Was This Post Helpful? 0
  • +
  • -

#3 Schwarzenegger   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 26
  • Joined: 20-February 07

Re: exit program with or without saving data

Posted 13 May 2019 - 02:51 AM

The ancient version.
I have edited the textboxes manually when in design mode. On exiting from the project the project is saved and the form with the edited bits is available to another project. Surely this can be done when running the exe file?
Was This Post Helpful? 0
  • +
  • -

#4 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 15172
  • View blog
  • Posts: 60,735
  • Joined: 12-June 08

Re: exit program with or without saving data

Posted 13 May 2019 - 06:54 AM

Filestream or streamreader.. I am not sure if vb6 has those specifically, but yeah you can write those.

Seems you were writing files in a previous post so you would want to follow that.

Reading is about as similar. I can imagine your app would have a 'refresh' button or some event to kick off reading from what ever location and filling in the information.

Though all of this would be better if it were in a database.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1