What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » Visual Basic .NET: Deleting a Registry Value failed

Visual Basic .NET: Deleting a Registry Value failed
Author: Message:
ryxdp
Senior Member
****


Posts: 804
Reputation: 16
29 / Male / Flag
Joined: Jun 2006
O.P. RE: Visual Basic .NET: Deleting a Registry Value failed
It still thinks the value doesn't exist. I must have missed something in the code you gave me, Cookie.

Here is the full Sub:

vb.net code:
    Private Sub NotifyIcon1_DoubleClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TrayIcon.DoubleClick
 
        'If screensaver is active on double click, delete the SCRNSAVE.EXE value and change ScreenSaveActive to 0
        If My.Computer.Registry.GetValue("HKEY_Current_User\Control Panel\Desktop\", "ScreenSaveActive", "Unknown") = "1" Then
            My.Computer.Registry.CurrentUser.OpenSubKey("HKEY_CURRENT_USER\Control Panel\Desktop", True)
            My.Computer.Registry.CurrentUser.DeleteValue("testingval")
            My.Computer.Registry.CurrentUser.Close()
            My.Computer.Registry.SetValue("HKEY_Current_User\Control Panel\Desktop\", "ScreenSaveActive", "0")
        End If
        If My.Computer.Registry.GetValue("HKEY_Current_User\Control Panel\Desktop\", "ScreenSaveActive", "Unknown") = "0" Then
 
            'Otherwise create the SCRNSAVE.EXE value, using the data from conf.ini and change ScreenSaveActive to 1
            My.Computer.Registry.SetValue("HKEY_Current_User\Control Panel\Desktop\", "testingkey", "C:\Windows\System32\ribbons.scr")
            My.Computer.Registry.SetValue("HKEY_Current_User\Control Panel\Desktop\", "ScreenSaveActive", "1")
        End If
    End Sub


This post was edited on 12-22-2008 at 02:13 AM by ryxdp.
07-13-2008 12:26 AM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Visual Basic .NET: Deleting a Registry Value failed - by ryxdp on 07-12-2008 at 08:21 AM
RE: Visual Basic .NET: Deleting a Registry Value failed - by Matti on 07-12-2008 at 10:09 AM
RE: RE: Visual Basic .NET: Deleting a Registry Value failed - by ryxdp on 07-12-2008 at 10:16 AM
RE: Visual Basic .NET: Deleting a Registry Value failed - by CookieRevised on 07-12-2008 at 02:55 PM
RE: Visual Basic .NET: Deleting a Registry Value failed - by ryxdp on 07-13-2008 at 12:26 AM
RE: RE: Visual Basic .NET: Deleting a Registry Value failed - by pollolibredegrasa on 07-13-2008 at 01:48 AM
RE: Visual Basic .NET: Deleting a Registry Value failed - by ryxdp on 07-13-2008 at 05:11 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On