Registry Repository


Author
Message
Ricardo Quartier
Ricardo Quartier
StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)
Group: Forum Members
Posts: 87, Visits: 779
Hi friends, can u explain how to use that control?

Thanks...   BigGrin

Reply
Ricardo Quartier
Ricardo Quartier
StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)
Group: Forum Members
Posts: 87, Visits: 779
Yo friends after work i get to this:

On the form I found a property called RegistryRepositoryKey

I put this value HKEY_LOCAL_MACHINE\SOFTWARE\teste

Then i went to the register and create that key "teste" (test for u texan people) Smile

I put that on the form_load method:

Me.Width = RegistryRepository1.ReadInt32((Me.RegistryRepositoryKey), "form1_width", 5)

Then, 5 new values appear: SF_FormHeight, SF_FormState, SF_FormWidth, SF_FormX, SF_FormY and the best is that it works, after running the solution and moves the form to a diferent place on a screen, it saves diferent values, and after running again, the form starts in the previous position.

So far, so good, all okidoki, but that makes me thought.. I need to create a key for every form. If the aplication is going to run on my machine only.. ok.. but.. it's not.. so after all that here comes the question:

Is that a way, maybe inside a "if ... then" code to check if the key already exists? if not:

let the form auto create the key, maybe with HKEY_LOCAL_MACHINE\SOFTWARE\teste\My Form Name or Text ?

if this is easy to write? Please post here, if not forget, i do not want to take your time...

Thanks.

 

 


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search