How to Call .exe Files Using Visual Basic .NET

Submitted by: 
Visitors have accessed this post 1392 times.

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
1Step 2
Create User Interface
2Step 3
In Every button put this code
3Source 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

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • You may insert videos with [video:URL]
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <th> <img> <h1> <h2> <h3> <iframe> [video]
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <asp>, <c>, <cpp>, <csharp>, <css>, <html4strict>, <java>, <javascript>, <mysql>, <php>, <python>, <sql>, <vb>, <vbnet>. The supported tag styles are: <foo>, [foo].
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.