Couple of VB.NET questions

  • Thread starter Thread starter punt
  • Start date Start date
P

punt

I've got a couple of questions about a deployed VB.NET application.
Firstly can a deployed application remember any variables(single string)
after being closed down and re-opened, without the use of a database?

Secondly I've been looking at inserting bookmarks into a word template like
shown in:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;316383
Is it possible to insert an image into a bookmark as well, or does it only
work with strings?

Thanks a lot for any help
Punter
 
To answer your first question: You can have the deployed application creat
registry keys for you & when the application is open, check/update those
values.

For using the registry in a deployment project use the registry editor. To
change the values in code & store them in the registry reference the
'Microsoft.Win32'

Imports Microsoft.Win32

Dim reg As RegistryKey
reg = Registry.CurrentUser.CreateSubKey("Software\My Software Key")
reg.SetValue("My SubKey", "My Value")
reg.Close()

As for the second question: I am not sure because I really don't do MS
Office - VB.NET programming that often.
 
I've got a couple of questions about a deployed VB.NET application.
Firstly can a deployed application remember any variables(single string)
after being closed down and re-opened, without the use of a database?

Nope although there are many options:

o Use the HKEY_CURRENT_USER portion of the registry
o Save a file in a sub-folder (e.g. Windows) of the user's home directory
(My Documents)
o Save it in the program's own folder keyed using the user name or similar

As it's just a single string, the registry is probably the best bet.

Rob.
 
Rob Nicholson said:
Nope although there are many options:

o Use the HKEY_CURRENT_USER portion of the registry
o Save a file in a sub-folder (e.g. Windows) of the user's home directory
(My Documents)
o Save it in the program's own folder keyed using the user name or similar

As it's just a single string, the registry is probably the best bet.

Rob.

Thanks a lot for your and Crouchie's help
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top