Load Start Up Program in VB.NET
Submitted by donbermoy on Tuesday, May 19, 2015 - 22:51.
This tutorial will teach you how to create a program that can load all the start up programs in your computer and loads the total number of it using VB.NET.
Now, let's start this tutorial!
1. Let's start with creating a Windows Form Application for this tutorial by following the following steps in Microsoft Visual Studio: Go to File, click New Project, and choose Windows Application.
2. Next, add only one ListView with two Columns and named it as ListView1, one button for loading the startup programs, and one label to retrieve the total number of startup programs. You must design your interface like this:
3. Now, we will do the coding.
We will first import the Microsoft.Win32 library to access the registry namespace.
Then, we will declare some variables that we will going to use to retrieve those startup programs with the number of programs their.
Lastly, have this code for your button that it will load all the startup programs and retrieved the total number of it.
Download the source code and try it.
For more inquiries and need programmer for your thesis systems in any kind of programming languages, just contact my number below.
Best Regards,
Engr. Lyndon Bermoy
IT Instructor/System Developer/Android Developer/Freelance Programmer
Mobile: 09488225971
Landline: 826-9296
E-mail:[email protected]
Add and Follow me on Facebook: https://www.facebook.com/donzzsky
Visit and like my page on Facebook at: https://www.facebook.com/BermzISware

- Imports Microsoft.Win32
- Dim g As RegistryKey
- Dim appname As String
- Dim newlistv As New ListView
- Dim a As String, m, u, Numberofstartupprograms As Int32
- Private Sub ButtonLoad_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonLoad.Click
- 'clear the listview and the newlistview
- Numberofstartupprograms = 0
- ListView1.Items.Clear()
- newlistv.Items.Clear()
- ' accessing the local machine of the registy
- g = Registry.LocalMachine.OpenSubKey("Software\Microsoft\Windows\CurrentVersion\Run", True)
- ' get all the startup programs
- For Each item In g.GetValueNames
- Numberofstartupprograms += 1
- 'get the path of the name
- appname = CStr(g.GetValue(item))
- Application.DoEvents()
- ' added the startup programs to the listview
- ListView1.Items.Add(appname).SubItems.Add(item)
- newlistv.Items.Add(item)
- 'retrieved the total number of programs on the label
- Label1.Text = "Total Start-up: " & Numberofstartupprograms
- Next
- End Sub
Output:

Add new comment
- 210 views