Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27329

Help me with this Error please!

$
0
0
My code: I got it from http://www.youtube.com/watch?v=iBmQmIwcjpA
I used the exact code as in the video.

Code:

Option Explicit On
Imports Microsoft.Win32
Public Class Mainform
    Public Sub New()


        ' This call is required by the designer.
        InitializeComponent()
        addtostartup()

        ' Add any initialization after the InitializeComponent() call.

    End Sub
    Public Shared Sub addtostartup()
        Dim regkey As RegistryKey
        regkey = Registry.CurrentUser.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Run",
        regkey.SetValue("ApplicationName", Application.ExecutablePath, RegistryValueKind.String)

        regkey.Close()


    End Sub
End Class

I think the error is coming from

Viewing all articles
Browse latest Browse all 27329

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>