Solved

EASY - VB 6 Forms save

Posted on 2004-08-02
4
208 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

749 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