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, _
"Software\Microsoft\Windows\CurrentVersion\" & _
"App Paths\IEXPLORE.EXE", "Path", sValue)
If KeyFound Then HasIE = (sValue <> "")
If HasIE Then MsgBox sValue 'contains the path to IE
Set myReg = Nothing
--------------------------------
This Visual Basic Tip is provided by Element K Journals,
publishers of Inside Visual Basic, a monthly publication for Visual Basic users.
Previous Post
Snippets Code Storage
Snippets Code Storage
Next Post
Access 97 database password recovery
Access 97 database password recovery
Related Posts
Put your VB application into deep sleepThere may be occasions when you want an application to wait for a specified period of tim
Stop the Visual Basic scrollbar flashingThe problem with the Visual Basic Scrollbar is that it flashes. This is to indicate that
Don't Buy Linux From Wal-Mart".. Perhaps Linux vendors could help Wal-Mart as part of a new eco-initiative. Wal-Mart c
Use MSWord spell corrector tools within VBIf you would like to incorporate a Spellings Corrector in your VB app, it would take you
The Growing Trend Of A Computer Programming DegreeComputers and the Internet have streamlined their way into the homes of people all over t
How to create your own VB add-in featuresVisual Basic Programmers usually create add-ins because they feel short of features when