; Run at windows startup 'Desktop Application" | SQL Server

Big Entertainment On Demand

Download APK  - Visit Here

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.


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


End Classs
Thanks.
Know More :  ASP.Net  VB.Net  C#.Net  Sliverlight  XML  WPF  WCF Ajax
Share on Google Plus

About Sujay

Hi ! I am Sujay Sharma. I am working in Indian Railway as Guard. I am sharing my experience about Microsoft SQL Server with ASP.NET ,VB.NET,C#.NET,XML "" Thanks.
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment