Run Program On Windows Startup - VB.net {Voice Tutorial}

Publié le: 21 mars 2010
sur la chaîne: MrVbdude
26,675
99

http://mrvbdude.blogspot.com/

How to run a Program on Startup using Visual Basic (VB.net) - Voice Tutorial
╔═╦╗╔╦╗╔═╦═╦╦╦╦╗╔═╗
║╚╣║║║╚╣╚╣╔╣╔╣║╚╣═╣
╠╗║╚╝║║╠╗║╚╣║║║║║═╣
╚═╩══╩═╩═╩═╩╝╚╩═╩═╝
Codes:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim regKey As Microsoft.Win32.RegistryKey
Dim KeyName As String = "Test"
Dim KeyValue As String = "C:\test\test.exe"

regKey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("Software\Microsoft\Windows\CurrentVersion\Run", True)

If regKey.GetValue(KeyName) = Nothing Then
'if there's no KeyName yet? then create and set it's value
MsgBox("No value found")
regKey.SetValue(KeyName, KeyValue, Microsoft.Win32.RegistryValueKind.String)
MsgBox("key " & KeyName & " has been created")
Else
MsgBox("This Program already exists", vbInformation, "Information")

End If

End Sub

End Class
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Thanks for Watching...Please Subscribe for more =)


Sur cette page du site, vous pouvez voir la vidéo en ligne Run Program On Windows Startup - VB.net {Voice Tutorial} durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur MrVbdude 21 mars 2010, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 26,675 fois et il a aimé 99 téléspectateurs. Bon visionnage!