General discussion

Locked

Can I Know Floppy Disk SNo. Using VB6

By khalid ·
How Can I know the Floppy Disk Serial Number
using VB6,
Explaning :
if i want to copy some VB program to the floppy disk and i want to check the serial nummber of that floppy disk ,what can i to do
with VB6?

This conversation is currently closed to new comments.

4 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Can I Know Floppy Disk SNo. Using VB6

by Bill_H In reply to Can I Know Floppy Disk SN ...

The following code snippet will retrieve the label, serial number, total space, and free space for a floopy in drive A:

Dim fsoSample As FileSystemObject
Dim drvSample As Drive
Dim sSpecs As String

Set fsoSample = New FileSystemObject
Set drvSample = fsoSample.GetDrive(fsoSample.GetDriveName("A:"))
sSpecs = "Drive " & UCase("A:") & " - "
sSpecs = sSpecs & drvSample.VolumeName & vbCrLf
sSpecs = sSpecs & drvSample.SerialNumber & vbCrLf
sSpecs =sSpecs & "Total Space: " & FormatNumber(drvSample.TotalSize / 1024, 0)
sSpecs = sSpecs & " Kb" & vbCrLf
sSpecs = sSpecs & "Free Space: " & FormatNumber(drvSample.FreeSpace / 1024, 0)
sSpecs = sSpecs & " Kb" & vbCrLf
MsgBox sSpecs

For more information, see the following MSDN articles:

Working with Drives and Folders
http://msdn.microsoft.com/library/devprods/vs6/vbasic/vbcon98/vbconmanipulatingdrivesfolders.htm

-AND-

The File System Objects
http://msdn.microsoft.com/library/devprods/vs6/vbasic/vbcon98/vbconthefilesystemobjects.htm

(If the URLs above do not work, locate and remove any spaces inserted by the TechRepublic system.)

Hope this helps...

Collapse -

Can I Know Floppy Disk SNo. Using VB6

by Bill_H In reply to Can I Know Floppy Disk SN ...

Almost forgot...in order for this to work, you will need to reference the Microsoft Scripting Runtime component (scrrun.dll) in your VB project.

Collapse -

Can I Know Floppy Disk SNo. Using VB6

by khalid In reply to Can I Know Floppy Disk SN ...

thank you very much

Collapse -

Can I Know Floppy Disk SNo. Using VB6

by khalid In reply to Can I Know Floppy Disk SN ...

This question was closed by the author

Back to Web Development Forum
4 total posts (Page 1 of 1)  

Related Discussions

Related Forums