Run at windows startup 'Desktop Application"
Know More : ASP.Net VB.Net C#.Net Sliverlight XML WPF WCF Ajax
Let's start with visual studio 2008\2005\2003 using language vb.net.Create a new project Title"Start with windows". First of all we declare namespace.
End Classs
Thanks.
Know More : ASP.Net VB.Net C#.Net Sliverlight XML WPF WCF Ajax
Let's start with visual studio 2008\2005\2003 using language vb.net.Create a new project Title"Start with windows". First of all we declare namespace.
Imports Microsoft.Win32
Imports System.Windows.Forms
Imports System.IO
Now ...
Public Class startup
Private directory As Directory
Dim fileName As String
Dim regKey As RegistryKey
Private Sub writeToRegistry()
regKey=Registry.CurrentUser.OpenSubKey("SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\RUN", True)
fileName = directory.GetCurrentDirectory().ToString + "\your_application_name.exe"
regKey.SetValue("your_application_name", fileName)
MessageBox.Show("This program will start on windows startup.", "Sujay Application", MessageBoxButtons.OK)
regKey.Close()
end sub
Private Sub Buttonstartup_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonX1.Click
writeToRegistry()
End Sub
Thanks.
Know More : ASP.Net VB.Net C#.Net Sliverlight XML WPF WCF Ajax
No comments