Windows Develop Bookmark and Share   
 index > Windows Forms General > Hard Disk Drives Count
 

Hard Disk Drives Count

Dim Fxd = IO.DriveType.Fixed
For Each Fixed In My.Computer.FileSystem.Drives.Count.ToString

Next

is this right?

haihtomy  Monday, August 07, 2006 11:11 PM

no that is incorrect.

 

What exactly do you want to do?

if you want to list the drive types of your system, try:

 



For Each curDrive as DriveInfo In My.Computer.FileSystem.Drives
   If curDrive.DriveType = DriveType.Fixed Then
      MessageBox.Show(curDrive.Name)
   End If
Next

 

 

is this what you are after?

ahmedilyas  Monday, August 07, 2006 11:57 PM

no that is incorrect.

 

What exactly do you want to do?

if you want to list the drive types of your system, try:

 



For Each curDrive as DriveInfo In My.Computer.FileSystem.Drives
   If curDrive.DriveType = DriveType.Fixed Then
      MessageBox.Show(curDrive.Name)
   End If
Next

 

 

is this what you are after?

ahmedilyas  Monday, August 07, 2006 11:57 PM

hi,

Is your problem solved?

Bhanu.

Bhanu Prakash Nunna - MSFT  Tuesday, August 08, 2006 12:22 AM

Function DiskDraw()

For Num As Integer = 0 To My.Computer.FileSystem.Drives.Count - 1

If My.Computer.FileSystem.Drives.Item(Num).DriveType = IO.DriveType.Fixed Then

DiskGraph(Num) = New Label : With DiskGraph(Num)

.Parent = DiskBox(Num) : .BorderStyle = BorderStyle.Fixed3D

.BackColor = Color.FromKnownColor(KnownColor.Control)

.Location = New Point(6, 16) : .Size = New Size(94, 8)

End With

End If

Next

Return Nothing

End Function

in the yellow color are there any suggetion!

haihtomy  Wednesday, August 09, 2006 7:43 PM
Thats pretty much what I have supplied in my post
ahmedilyas  Wednesday, August 09, 2006 7:45 PM

You can use google to search for other answers

Custom Search

More Threads

• Splitting graphic output
• VB.Net - Radiobuttons in menu
• Draw round border?
• How to restrain rendering area?
• C# 3.0 - Change CurrentCell BorderStyle in myDataGridView
• Expand/Collapse a category in property grid
• query problem
• How do I add a column '------Select-----' to a databound Combobox
• Please help how to change form control property from other class
• How to make multiple pages?