Click here to Skip to main content
15,899,126 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionMultiple assemblies - System.IO.FileNotFound Exception [modified] Pin
theitmueller23-May-08 1:28
theitmueller23-May-08 1:28 
QuestionScanning/Enumeration of Registry keys Pin
sonia.sardana22-May-08 22:35
sonia.sardana22-May-08 22:35 
AnswerRe: Scanning/Enumeration of Registry keys Pin
Tony Richards22-May-08 23:45
Tony Richards22-May-08 23:45 
GeneralRe: Scanning/Enumeration of Registry keys Pin
sonia.sardana23-May-08 0:02
sonia.sardana23-May-08 0:02 
GeneralRe: Scanning/Enumeration of Registry keys Pin
Tony Richards23-May-08 0:05
Tony Richards23-May-08 0:05 
GeneralRe: Scanning/Enumeration of Registry keys Pin
sonia.sardana23-May-08 0:07
sonia.sardana23-May-08 0:07 
GeneralRe: Scanning/Enumeration of Registry keys Pin
Tony Richards23-May-08 0:18
Tony Richards23-May-08 0:18 
GeneralRe: Scanning/Enumeration of Registry keys Pin
Steven J Jowett23-May-08 3:39
Steven J Jowett23-May-08 3:39 
The following code demonstrates how to read a registry entry. You should be able to build on it to incorporate Write, Delete etc.

Public Enum Root As Byte<br />
        CurrentUser = 1<br />
        LocalMachine = 2<br />
        CurrentConfig = 3<br />
        ClassesRoot = 4<br />
        Users = 5<br />
    End Enum<br />
<br />
    Function ReadEntry(ByVal RegistryRoot As Root, ByVal Location As String, ByVal Name As String) As String<br />
        Dim regKey As Microsoft.Win32.RegistryKey<br />
        Select Case RegistryRoot<br />
            Case Root.CurrentUser<br />
                regKey = Microsoft.Win32.Registry.CurrentUser.OpenSubKey(Location)<br />
            Case Root.LocalMachine<br />
                regKey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(Location)<br />
            Case Root.CurrentConfig<br />
                regKey = Microsoft.Win32.Registry.CurrentConfig.OpenSubKey(Location)<br />
            Case Root.ClassesRoot<br />
                regKey = Microsoft.Win32.Registry.ClassesRoot.OpenSubKey(Location)<br />
            Case Root.Users<br />
                regKey = Microsoft.Win32.Registry.Users.OpenSubKey(Location)<br />
            Case Else<br />
                regKey = Nothing<br />
        End Select<br />
        If regKey Is Nothing Then<br />
            ReadEntry = Nothing<br />
        Else<br />
            Try<br />
                ReadEntry = regKey.GetValue(Name).ToString<br />
                regKey.Close()<br />
            Catch<br />
                Return Nothing<br />
            End Try<br />
        End If<br />
    End Function


Steve Jowett
-------------------------
It is offen dangerous to try and see someone else's point of view, without proper training. Douglas Adams (Mostly Harmless)

QuestionHow to get more 1000 records from a active directory using ado.net Pin
Chaitanya kumar CVSS22-May-08 22:05
Chaitanya kumar CVSS22-May-08 22:05 
AnswerRe: How to get more 1000 records from a active directory using ado.net Pin
jzonthemtn23-May-08 15:58
jzonthemtn23-May-08 15:58 
GeneralRe: How to get more 1000 records from a active directory using ado.net Pin
Chaitanya kumar CVSS3-Jun-08 4:01
Chaitanya kumar CVSS3-Jun-08 4:01 
QuestionRTF Pin
the_smiths22-May-08 14:42
the_smiths22-May-08 14:42 
AnswerRe: RTF Pin
Christian Graus22-May-08 16:24
protectorChristian Graus22-May-08 16:24 
AnswerRe: RTF Pin
Steven J Jowett22-May-08 21:20
Steven J Jowett22-May-08 21:20 
GeneralRe: RTF Pin
supercat923-May-08 13:59
supercat923-May-08 13:59 
AnswerRe: RTF Pin
Peter Josefsson Sweden23-May-08 17:51
Peter Josefsson Sweden23-May-08 17:51 
QuestionLive video display in vb .NET 2005/08 express Pin
Absenm22-May-08 14:17
Absenm22-May-08 14:17 
AnswerRe: Live video display in vb .NET 2005/08 express Pin
Christian Graus22-May-08 16:57
protectorChristian Graus22-May-08 16:57 
GeneralRe: Live video display in vb .NET 2005/08 express Pin
Absenm22-May-08 19:26
Absenm22-May-08 19:26 
GeneralRe: Live video display in vb .NET 2005/08 express Pin
Christian Graus22-May-08 21:20
protectorChristian Graus22-May-08 21:20 
GeneralRe: Live video display in vb .NET 2005/08 express Pin
Absenm22-May-08 22:13
Absenm22-May-08 22:13 
QuestionSQL Image Project Pin
bapu288922-May-08 9:29
bapu288922-May-08 9:29 
AnswerRe: SQL Image Project Pin
Christian Graus22-May-08 16:44
protectorChristian Graus22-May-08 16:44 
QuestionUpdate/change Database field... Pin
CCG322-May-08 9:11
CCG322-May-08 9:11 
AnswerRe: Update/change Database field... Pin
jzonthemtn22-May-08 16:46
jzonthemtn22-May-08 16:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.