Click here to Skip to main content
15,915,509 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Software to attach with winlogon.exe Pin
Mekong River29-Dec-06 15:32
Mekong River29-Dec-06 15:32 
QuestionEvent hander of multiple buttons Pin
tbryce31116-Dec-06 14:31
tbryce31116-Dec-06 14:31 
AnswerRe: Event hander of multiple buttons Pin
Guffa16-Dec-06 15:41
Guffa16-Dec-06 15:41 
GeneralRe: Event hander of multiple buttons Pin
tbryce31117-Dec-06 4:56
tbryce31117-Dec-06 4:56 
GeneralRe: Event hander of multiple buttons Pin
Dave Kreskowiak17-Dec-06 6:15
mveDave Kreskowiak17-Dec-06 6:15 
AnswerRe: Event hander of multiple buttons Pin
Guffa17-Dec-06 9:14
Guffa17-Dec-06 9:14 
AnswerRe: Event hander of multiple buttons Pin
Thomas Stockwell17-Dec-06 4:49
professionalThomas Stockwell17-Dec-06 4:49 
QuestionLoad Values from registry into checkedlistbox Pin
guayony16-Dec-06 8:17
guayony16-Dec-06 8:17 
Hi I have the following code that hides a drive depending on the check status.

  Private Sub Hide_Drive()<br />
<br />
        Dim DriveStr As String = ""<br />
        Dim Regkey As RegistryKey<br />
        Dim DArr As New ArrayList<br />
        Dim i As Integer<br />
        Dim Cnt As Integer = 0<br />
<br />
        For i = 0 To Chlsb_Drives.CheckedItems.Count - 1<br />
            Select Case Chlsb_Drives.CheckedItems(i).ToString()<br />
                Case Is = "A"<br />
                    Cnt += 1 : DriveStr &= "A"<br />
                Case Is = "B"<br />
                    Cnt += 2D : DriveStr &= "B"<br />
                Case Is = "C"<br />
                    Cnt += 4D : DriveStr &= "C"<br />
                Case Is = "D"<br />
                    Cnt += 8 : DriveStr &= "D"<br />
                Case Is = "E"<br />
                    Cnt += 16 : DriveStr &= "E"<br />
                Case Is = "F"<br />
                    Cnt += 32 : DriveStr &= "F"<br />
                Case Is = "G"<br />
                    Cnt += 64 : DriveStr &= "G"<br />
                Case Is = "H"<br />
                    Cnt += 128 : DriveStr &= "H"<br />
                Case Is = "I"<br />
                    Cnt += 256 : DriveStr &= "I"<br />
                Case Is = "J"<br />
                    Cnt += 512 : DriveStr &= "J"<br />
                Case Is = "K"<br />
                    Cnt += 1024 : DriveStr &= "K"<br />
                Case Is = "L"<br />
                    Cnt += 2048 : DriveStr &= "L"<br />
                Case Is = "M"<br />
                    Cnt += 4096 : DriveStr &= "M"<br />
                Case Is = "N"<br />
                    Cnt += 8192 : DriveStr &= "N"<br />
                Case Is = "O"<br />
                    Cnt += 16384 : DriveStr &= "O"<br />
                Case Is = "P"<br />
                    Cnt += 32768 : DriveStr &= "P"<br />
                Case Is = "Q"<br />
                    Cnt += 65536 : DriveStr &= "Q"<br />
                Case Is = "R"<br />
                    Cnt += 131072 : DriveStr &= "R"<br />
                Case Is = "S"<br />
                    Cnt += 262144 : DriveStr &= "S"<br />
                Case Is = "T"<br />
                    Cnt += 524288 : DriveStr &= "T"<br />
                Case Is = "U"<br />
                    Cnt += 1048576 : DriveStr &= "U"<br />
                Case Is = "V"<br />
                    Cnt += 2097152 : DriveStr &= "V"<br />
                Case Is = "W"<br />
                    Cnt += 4194304 : DriveStr &= "W"<br />
                Case Is = "X"<br />
                    Cnt += 8388608 : DriveStr &= "X"<br />
                Case Is = "Y"<br />
                    Cnt += 16777216 : DriveStr &= "Y"<br />
                Case Is = "Z"<br />
                    Cnt += 33554432 : DriveStr &= "Z"<br />
            End Select<br />
        Next<br />
        'save drives' setting in registry<br />
        Regkey = Registry.CurrentUser.CreateSubKey("Software\Hide Drive")<br />
        Regkey.SetValue("Cnt", Cnt)<br />
        Regkey.SetValue("Drives", DriveStr)<br />
        Regkey.Close()<br />
        ' Update registry key<br />
        Regkey = Registry.CurrentUser.OpenSubKey("Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", True)<br />
        Regkey.SetValue("NoDrives", Cnt)<br />
        Regkey.Close()<br />
<br />
    End Sub


I can't figure out how to check the items back when I load the form.

Can someone help?

Thank youFrown | :(
QuestionRe: Load Values from registry into checkedlistbox Pin
Are Jay16-Dec-06 19:43
Are Jay16-Dec-06 19:43 
QuestionChange Button Name, and Image When Button is Clicked [modified] Pin
Skullie8416-Dec-06 6:38
Skullie8416-Dec-06 6:38 
AnswerRe: Change Button Name, and Image When Button is Clicked Pin
The ANZAC16-Dec-06 10:48
The ANZAC16-Dec-06 10:48 
GeneralRe: Change Button Name, and Image When Button is Clicked Pin
Skullie8418-Dec-06 3:55
Skullie8418-Dec-06 3:55 
GeneralRe: Change Button Name, and Image When Button is Clicked Pin
The ANZAC18-Dec-06 9:46
The ANZAC18-Dec-06 9:46 
QuestionRich Text Box in VB .net that support graphics Pin
Nirav N Soni16-Dec-06 4:07
Nirav N Soni16-Dec-06 4:07 
QuestionRead mp3 file Pin
SilentBob10115-Dec-06 23:36
SilentBob10115-Dec-06 23:36 
AnswerRe: Read mp3 file Pin
Guffa16-Dec-06 0:07
Guffa16-Dec-06 0:07 
Questionremember me on same computer!!! Pin
Ashish Porwal15-Dec-06 20:16
Ashish Porwal15-Dec-06 20:16 
AnswerRe: remember me on same computer!!! Pin
MatrixCoder15-Dec-06 20:22
MatrixCoder15-Dec-06 20:22 
AnswerRe: remember me on same computer!!! Pin
amaneet15-Dec-06 20:39
amaneet15-Dec-06 20:39 
AnswerRe: remember me on same computer!!! Pin
toxcct22-Jan-07 9:05
toxcct22-Jan-07 9:05 
Questionms access Pin
latharedy15-Dec-06 19:59
latharedy15-Dec-06 19:59 
AnswerRe: ms access Pin
Agus Budianto27-Dec-06 3:26
Agus Budianto27-Dec-06 3:26 
QuestionI have changed the webpage name from webform1.aspx to stdents.aspx and i debugged it. I got an error like:... Pin
tirumal123115-Dec-06 19:47
tirumal123115-Dec-06 19:47 
AnswerRe: I have changed the webpage name from webform1.aspx to stdents.aspx and i debugged it. I got an error like:... Pin
Are Jay16-Dec-06 19:50
Are Jay16-Dec-06 19:50 
Questiondrawing function (PaintEventArgs) Pin
charchabil0315-Dec-06 9:49
charchabil0315-Dec-06 9:49 

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.