Free Source Code and Tutorials

Custom Search

30- Download and Run File

In this tutorial, we will learn on how to download and run a file in Visual Basic 2008.


Let’s begin :

  1. Open the Visual Basic, select “File” on the menu, hit new and create a new project.
  2. The New Project dialog will appear.
    Select “windows” in the project types, hit the “windows form application” in the templates and hit “ok“.
  3. In the toolbox select a button and drag it into the form.
  4. Add the following code in the code editor.
    1. Public Class Form1Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    2. 'downloading a file
    3. My.Computer.Network.DownloadFile("url", "C:\file.exe")
    4. 'run a file
    5. Process.Start("C:\file.exe")
    6. End Sub
    8. End Class
Facebook Comments
(Visited 9 times, 1 visits today)
Share this

Check Your Domain Ranking

Leave a Reply

Your email address will not be published. Required fields are marked * © 2016 Frontier Theme

Subscribe For Latest Updates

Signup for our newsletter and get notified when we publish new articles for free!

%d bloggers like this: