Today I will show how you can get the driver letter of current . It´s very simple.
1-Open your Visual Studio program
2-Select Visual Basic language. Rename it and crte the project
3-Double-Click in the Form or press F7 to open the form. If you use F7 you have to erate the Load Event of the form
(In this case I´m gonna use a MessageBox but you can use also a Label, TextBox …)
4-In the begin of the form add this line of :
Imports.System.IO
5-Finally in the Load Event add this line:
Dim driver = Path.GetPathRoot(Environment.SystemDirectory)
MsgBox(driver , vbOk + vbInformation, “What is the letter of my ?”)
Label1.Text = driver
TextBox1.Text = driver
No comments:
Post a Comment