.:: Jasa Membuat Aplikasi Website,Desktop,Android Order Now..!! | | Order Now..!! Jasa Membuat Project Arduino,Robotic,Print 3D ::.

Get All Drives from your computer

0 komentar


بِسْــــــــــــــــمِ اﷲِالرَّحْمَنِ اارَّحِيم
bismillaahirrahmaanirrahiim

السَّلاَمُ عَلَيْكُمْ وَرَحْمَةُ اللهِ وَبَرَكَاتُهُ
Assalamu'alaikum warahmatullahi wabarakatuh

Get All Drives from your computer in VB.NET

Retrieve all your drives information easily simply by calling the GetDrive function. You also have to be careful with all the IN and OUT problems. Here is a sample with little protection to give you an idea:





Public Class Form1
    ''' <summary>
    ''' Sample : get all drives and get directories. very little error management
    ''' </summary>
    ''' <param name="sender"></param>
    ''' <param name="e"></param>
    ''' <remarks>this is a sample, 2012-11-09</remarks>
    Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        Dim AllDrive() As System.IO.DriveInfo
        Dim sDrives As String
        Dim sDirectory() As String

        Try
            sDrives = ""
            AllDrive = System.IO.DriveInfo.GetDrives 'get all drives availables on your computer
            For Each drive As System.IO.DriveInfo In AllDrive
                If drive.IsReady = True Then 'prevent crash : CD-ROM drive or disconnected drive
                    sDrives = sDrives & drive.Name & vbCrLf
                    sDirectory = System.IO.Directory.GetDirectories(drive.Name) 'get all drives Names

                    For Each sFolder As String In sDirectory
                        'TODO something here
                    Next
                End If
            Next
            MsgBox(sDrives) 'display all available drive Names
        Catch ex1 As System.IO.IOException
            MsgBox(ex1.StackTrace) 'basic error message for read-write-files-directories....
        Catch ex As Exception
            MsgBox(ex.StackTrace) 'basic error message
        End Try

    End Sub
End Class



If you run the little program, a MsgBox will display all the available drives. I also introduce the IsReady property in case you want to access one of those drives.
If you try to access a CD-Rom drive (DVD, SD drive, floppy drive A: �). What I just said??? Floppy drive?  He! He! You will also need to be careful if you try to access restricted folder.  The folder �Documents and Setting� on your �C:� might not be accessible from your little program. So you have to work harder.



Reference :

The program I bought for this article: Visual Studio 2010 Professional (Old Version)
A newer version for Visual Basic : Microsoft Visual Studio Pro 2012
Check Technologies Officiel Web Site : http://checktechno.ca



Update Contact :
No Wa/Telepon (puat) : 085267792168
No Wa/Telepon (fajar) : 085369237896
Email : Fajarudinsidik@gmail.com
NB :: Bila Sobat tertarik Ingin membuat software, membeli software, membeli source code, membeli hardware elektronika untuk kepentingan Perusahaan maupun Tugas Akhir (TA/SKRIPSI), Insyaallah Saya siap membantu, untuk Respon Cepat dapat menghubungi kami, melalui :

No Wa/Telepon (puat) : 085267792168
No Wa/Telepon (fajar) : 085369237896
Email: Fajarudinsidik@gmail.com


atau Kirimkan Private messanger melalui email dengan klik tombol order dibawah ini :

ٱلْحَمْدُ لِلَّهِ رَبِّ ٱلْعَٰلَمِين
Alhamdulilah hirobil alamin

وَ السَّلاَمُ عَلَيْكُمْ وَرَحْمَةُ اللهِ وَبَرَكَاتُهُ
wassalamualaikum warahmatullahi wabarakatuh


Artikel Get All Drives from your computer, Diterbitkan oleh scodeaplikasi pada Jumat, 09 November 2012. Semoga artikel ini dapat menambah wawasan Anda. Website ini dipost dari beberapa sumber, bisa cek disini sumber, Sobat diperbolehkan mengcopy paste / menyebar luaskan artikel ini, karena segala yang dipost di public adalah milik public. Bila Sobat tertarik Ingin membuat software, membeli software, membeli source code ,Dengan Cara menghubungi saya Ke Email: Fajarudinsidik@gmail.com, atau No Hp/WA : (fajar) : 085369237896, (puat) : 085267792168.

Tawk.to