SH3H@N Wares.

This is Where The My Best Creation Would Be. Make Sure You Check often to stay updated with the latest Update of some of the Best Freewares.

SH3H@N Apps.

Some of the Most usefull Software and Apps that we use in our daily Life. Give Your OS a Stunning new Look.

Visual Basic.NET (VB.NET)

Usefull Code Snippets Along with complete Original Solution file for Example.

SQL SERVER 2005

Quries, Stored Procedure, Triggers and many more with complete Example. Along with the Connection of Sql Server With VB.net 2008.

Gaming Zone

Software For games and some Trainers too.


Showing posts with label start process. Show all posts
Showing posts with label start process. Show all posts

Run Command in vb.net

0 comments



Create Run Command in vb.net


Want to know how to create run command in vb.net? Here is a simple and quick tutorial along with original vb.net solution file which will show you how to create your own run command. The process is easy and really quick but to make it easier lets divide it into following steps.

  • Designing
  • Coding

Designing


Create a new vb.net Project. Name it anything you want as I have named it “run command in vb.net”. Design it something like this.



No.      Control Type                Name

1          Label                            label1
2          Text Box                      textbox1
3          Button                          run
4          Button                          exti

Note: Control no 4 name is “exit” not “exit”

Coding


Double-Click on “run” button (Control no: 3) and write the following in it.

        Try
            Process.Start(TextBox1.Text)
        Catch ex As Exception
            MsgBox("Path does not exist")
        End Try

Now Again go to designer view and double click on ‘Exit” Button (control no: 4) and write the following code in it.

    Application.Exit()

And that’s it. Run the program by Pressing F5. Enter a path in text box Like for starters try “C:\” and click on “Run” button (control no: 3).
And “C:\” drive should be opened

Written By:
Shehan Abid (SH3H@N)
For:
SH3HANWARES.blogspot.com


Powered by Blogger.