Often you'll want to manipulate the Windows registry in Visual
Basic without resorting to lengthy API calls. Fortunately you can
with the Registry Access Functions (RegObj.dll) library. This DLL
lets you create a Registry object with which you can manipulate
specific keys. For example, in a previous tip we showed you how
to use the WebBrowser control to display an animated GIF.
Unfortunately, the WebBrowser is only available if the target
machine also has Internet Explorer installed. As a result, you
may want to display an alternative image if Internet Explorer
isn't available. To determine if IE is installed on the target
Windows 95 machine, first set a reference in your project to
Registry Access Functions. Then use code similar to that below:Dim myReg As New Registry, KeyFound As Boolean
Dim HasIE As Boolean, sValue As String
sValue = ""
KeyFound = myReg.GetKeyValue(HKEY_LOCAL_MACHINE, _
"SoftwareMicrosoftWindowsCurrentVersion" &
_
"App PathsIEXPLORE.EXE", "Path", sValue)
If KeyFound Then HasIE = (sValue <> "")
If HasIE Then MsgBox sValue 'contains the path to IE
Set myReg = Nothing
Read Registry values in VB without API
By ElementK Journals, published on 14 Jul 2001
| Filed in
You might also like...
VB 6 forum discussion
-
CorelDRAW VBA: cdrTraceLineDrawing FAILS, producing single linear path instead of Centerline trace?
by dancemanj (0 replies)
-
client/server application using activex
by beautifulheart (0 replies)
-
System Error &H8007007E. The specifed module could not be found.
by swiftsafe (5 replies)
-
Invitation to take part in an academic research study
by researchlab (0 replies)
-
Send SMS with SMPP
by mmahmoud (0 replies)
VB 6 podcasts
-
Stack Overflow Podcast: Podcast #45 – Keeping it Sharp
Published 7 years ago, running time 0h54m
Our guest this week is Eric Lippert – language architect extraordinaire and famous for all his work at Microsoft in developing their languages Eric joined Microsoft right out of college and was originally working on VB It’s time for everyone’s favorite game: Name the Worst Feature of that Microso.
Comments