473,396 Members | 1,724 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

working with Registry in VB.net

i have a problem. i am new to VB.net and need help with my project.

i used a colordialog box to change the color of the background of the form and need to save this color change in registry so that the color I picked from the color dialog box will appear when i restart the program.

I need help with the savesetting and getsetting from registry codings in VB.net.

Can anyone help me please?

Albert
Sep 21 '07 #1
2 1529
dip_developer
648 Expert 512MB
i have a problem. i am new to VB.net and need help with my project.

i used a colordialog box to change the color of the background of the form and need to save this color change in registry so that the color I picked from the color dialog box will appear when i restart the program.

I need help with the savesetting and getsetting from registry codings in VB.net.

Can anyone help me please?

Albert
have you spent sometime to learn about registry....???
I am giving you only the syntax of coding......please get a book and read about registry handling...........

syntax to save data to registry...............

SaveSetting ("<<Application Name>>", "<<Registry Folder Path>>", "<<Key Name>>", <<Value of the Key>>)


'example to save data to registry

Expand|Select|Wrap|Line Numbers
  1.  
  2. SaveSetting("TestApp", "Initialize", "Top", 75)
  3.  

'example to get data from registry

Expand|Select|Wrap|Line Numbers
  1.  
  2. Dim regVal As Integer
  3. regVal = CType(My.Computer.Registry.GetValue("Initialize", "Top", 0), Integer) 
  4.  
Sep 21 '07 #2
have you spent sometime to learn about registry....???
I am giving you only the syntax of coding......please get a book and read about registry handling...........

syntax to save data to registry...............

SaveSetting ("<<Application Name>>", "<<Registry Folder Path>>", "<<Key Name>>", <<Value of the Key>>)


'example to save data to registry

Expand|Select|Wrap|Line Numbers
  1.  
  2. SaveSetting("TestApp", "Initialize", "Top", 75)
  3.  

'example to get data from registry

Expand|Select|Wrap|Line Numbers
  1.  
  2. Dim regVal As Integer
  3. regVal = CType(My.Computer.Registry.GetValue("Initialize", "Top", 0), Integer) 
  4.  
thanks man

I have got the saving to registry part right but i have a problem when i have to convert string back to color from the registry using getsetting

I tried the code you mentioned but it didnt work

Thanks a million for your help.
Sep 21 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: glenn | last post by:
I am trying to write to the registry and the objects that are suppose to be handling this function are not working. Here is what is happening. I am issuing the following commands: RegistryKey...
1
by: firenet | last post by:
Came in one morning and found that the following message appeared only on running Access 2000, then the program shuts down, all other office 2000 applications work fine. "Required registry...
5
by: Chakkaradeep | last post by:
Hi all, in my service i added my Registry Programming code,am facing with a problem which am not able to rectify it..the problem is , in the service, the program gets hanged and doesnt move...
4
by: JohnB111 | last post by:
Hi Environment: Windows XPPRO SP2 IIS 5.1 AVG Anti Virus (Not script Blocking) The following code used to work perfectly on my local development machine and still does on my web server.
0
by: bazzer | last post by:
hey, i am using visual basic.net 2003 and have an ASP.NET webform application thats accessing a microsoft access 2003 database. i kept getting the following error when i tried to run it: ERROR ...
2
by: Ben | last post by:
I think I might have found a bug in Visual Studio. The following code should work and doesn't: My.Computer.Registry.LocalMachine.CreateSubKey("Software\Dravet")...
0
by: rbanerji | last post by:
I have a COM object built in C#. Its a an IE deskband. It implements the following method: public static void Register( Type t ) Which gets called when regasm is used and it makes teh...
5
by: Parv | last post by:
I am working in a domain environment. I am on a client machine and wants to edit registery of domain server. I am currently in a Domain user account and member of Domain administrators on the...
3
by: Aussie Rules | last post by:
Hi, I want to store some data in the registry, however I have not been able to do this, and think my logic maybe flawed. Firstly I try to open the registry and read in any existing values....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.