Solved

EASY - VB 6 Forms save

Posted on 2004-08-02
4
206 Views
Last Modified: 2010-08-05
Hello,

I have a problem with my VB 6 Project.

If i have a label on a form called 'theform' on a label called 'thelabel' that says "Hello" i can edit this by using code like ...

theform.thelabel = "Goodbye"

this works fine.  However, if i close my running project, and then start it back up again the labe has changed back to "Hello" and has not saved my changes.

I know in Access you have to edit a form in design mode for the changes to save, i dont think there is any kind of design mode in VB is there?

Does anyone know how i can save my changes to my vb form?

Thanks,

Daz
0
Comment
Question by:yo_daz_uk
  • 2
  • 2
4 Comments
 
LVL 53

Expert Comment

by:Dhaest
ID: 11693022
You can store the value in a file (xml, ini, ...).
When you start the program, you can load the value from that file and if you close your form, save the values back into the file.
0
 

Author Comment

by:yo_daz_uk
ID: 11693078
I thought about just getting it from a text file or even setting up a mini database for all my forms so they would be easy to change, however this seemed a bit excessive, for what i would think is a minor change.

I have only got 4 forms in the project!!!

Is there no simple save method or anything like that?  That would save it to the form some how?
0
 
LVL 53

Accepted Solution

by:
Dhaest earned 30 total points
ID: 11693104
No there's no alternative. Each vb-form must be compiled before it can be used. When you change something to it, it means you'll have to recompile it.
So the only options there are is using a resource file (ini, xml, txt, ...) or like you mentioned a database.
0
 

Author Comment

by:yo_daz_uk
ID: 11693124
OK thanks
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question