joao.palma Posted April 8, 2009 at 11:43 AM Report #255856 Posted April 8, 2009 at 11:43 AM Ola... estou a desenvolver uma aplicação para bloquear a escrita nas pens... para poder colocar a minha pen em qualquer pc sem ficar com virus... já consegui bloquear a escrita mas agora não sei listar as pens ou as drives do pc... alguém sabe? Eu queria uma combobox com as drives la dentro tipo: A: C: D: ... ---edit----- Esta já esta resolvida... ComboBox1.Items.Add(System.Environment.GetLogicalDrives(i)) Agora gostava de fazer a letra mais a marca do dispositivo... tipo: D: Kingston Data Traveler
jpaulino Posted April 8, 2009 at 08:50 PM Report #255974 Posted April 8, 2009 at 08:50 PM Olá, Podes fazer assim: Try For Each d As IO.DriveInfo In IO.DriveInfo.GetDrives() If d.DriveType = IO.DriveType.Removable AndAlso d.IsReady Then Debug.WriteLine(String.Format("Drive: {0}, Nome:{1}", d.Name, d.VolumeLabel)) End If Next Catch ex As Exception ' Ignora em caso de erro End Try
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now