Skip to main content

How to Call .exe Files Using Visual Basic .NET


Hi guys,

In this tutorial you will learn on how to call .exe files.

Source code is downloadable below.

Step 1
First Create a new Project

Step 2
Create User Interface

Step 3
In Every button put this code

Source Code

  1. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  2. Try
  3. System.Diagnostics.Process.Start("Calc.exe")
  4. Catch ex As Exception
  5. MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
  6. End Try
  7. End Sub
  9. Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
  10. Try
  11. System.Diagnostics.Process.Start("Notepad.exe")
  12. Catch ex As Exception
  13. MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
  14. End Try
  15. End Sub
  17. Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
  18. Try
  19. System.Diagnostics.Process.Start("mspaint.exe")
  20. Catch ex As Exception
  21. MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
  22. End Try
  23. End Sub
  25. Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
  26. Try
  27. System.Diagnostics.Process.Start("Winword.exe")
  28. Catch ex As Exception
  29. MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
  30. End Try
  31. End Sub

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.

Virus note: All files are scanned once-a-day by for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.


1. Re-scan downloaded files using your personal virus checker before using it.
2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

Add new comment

This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.