Registry and Windows7

berndgoedecke

Active Member
Licensed User
Longtime User
Hello evrybody,
I switched from XP to Windows7, this weekend.
On XP I had this Sub to write a Registry Key:
Public Sub KeyCreate(sk, skval)
reg.RootKey(reg.rtCurrentUser)
ErrorLabel(NotCreatedYet)
reg.SetStringValue(key,sk,skval)
'Msgbox("The value is: " & reg.GetValue(key,"TempFolder"))
Return
NotCreatedYet: 'creates the subkey if it didn't exist
reg.CreateSubKey("",key)
reg.SetStringValue(key,sk,skval)
'Msgbox("The key was created.")
End Sub

On Windows7 the Program stoped. Does anybody know what is to do?

Best regards

berndgoedecke
 

berndgoedecke

Active Member
Licensed User
Longtime User
Another Windows7 Problem

Thanks, AGraham and Erel, for the hint with the Administrator, but to run it as Admnistrator a have to compile the source, and there is the next problem.
Recently, under Windows7, the compiler shows an Synax error where never was a Syntaxerror with XP.
Here is a part of the Source where the Error happens:
(It's a Select / Case to choose the tool that is need to redraw all Graphik elements which parameters are saved to a SQLite Database.)

Main.cmd.CommandText = RepSelStr '"Select * FROM [" & TolN & "]"
Main.reader.Value = Main.cmd.ExecuteReader
Do While Main.reader.ReadNextRow = True
Seite = Main.reader.GetValue(0)
EZZ = Main.reader.GetValue(1)
Tool = Main.reader.GetValue(2)
Select Tool <----- Here the compiler remarked a syntax error
LCB = 0
LCE = 0
Case "Line"
'LCB = 0
'LCE = 0
Pen1Ex.Width = Main.reader.GetValue(3)
LCB = Main.reader.GetValue(4)
Pen1Ex.StartCap = LCaps(LCB)
LCE = Main.reader.GetValue(5) ......
I hope there is a solution for the problem.

Best regards

berndgoedecke
 

agraham

Expert
Licensed User
Longtime User
but to run it as Admnistrator a have to compile the source
No, just run Basic4ppc as Administrator and your app running in the IDE will inherit that.

You are missing the first Case statement
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…