How do I retrieve these settings?
HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\PageSetup ???:D
Printable View
How do I retrieve these settings?
HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\PageSetup ???:D
Try this thread
http://www.vbforums.com/showthread.p...ading+registry
Put this code in a module
Public Function getstring(Hkey As Long, strPath As String, strValue As String)
'EXAMPLE:
'
'text1.text = getstring(HKEY_CURRENT_USE
' R, "Software\VBW\Registry", "String")
'
Dim keyhand As Long
Dim datatype As Long
Dim lResult As Long
Dim strBuf As String
Dim lDataBufSize As Long
Dim intZeroPos As Integer
r = RegOpenKey(Hkey, strPath, keyhand)
lResult = RegQueryValueEx(keyhand, strValue, 0&, lValueType, ByVal 0&, lDataBufSize)
If lValueType = REG_SZ Then
strBuf = String(lDataBufSize, " ")
lResult = RegQueryValueEx(keyhand, strValue, 0&, 0&, ByVal strBuf, lDataBufSize)
If lResult = ERROR_SUCCESS Then
intZeroPos = InStr(strBuf, Chr$(0))
If intZeroPos > 0 Then
getstring = Left$(strBuf, intZeroPos - 1)
Else
getstring = strBuf
End If
End If
End If
End Function
On the form add a textbox (text1)
In the form load event add
Text1.Text = getstring(HKEY_CURRENT_USER, "Software\Microsoft\Internet Explorer\PageSetup", _
"Footer")
Techsent
Thank ya all,
it almost works !:D :D
RegArray = EnumKeyValues(HKEY_CURRENT_USER, "Software\Microsoft\Internet Explorer\PageSetup")
For intLoop = 0 To UBound(RegArray)
List1.AddItem RegArray(intLoop)
Next intLoop
Text1 = getstring(HKEY_CURRENT_USER, "PageSetup", "Footer")
Listbox is fine, it shows all the values like footer,header, margins, etc.
But I cannot retrieve any values to textbox, it is always empty,
but I know they are not MT in registry !
How do i read them ??:mad: :mad: :mad: :mad:
Post all your code for me to have a look at
here is the code:(
CAJSOFT,
please disregard ,
I got it now:
MsgBox QueryValue(HKEY_CURRENT_USER, "Software\Microsoft\Internet Explorer\PageSetup", "footer")
:D :D :D :mad: