Hmm. underligt - det meste af mit svar kom ikke med, men jeg prøver igen :
Du skal bruge GetVolumeInformation.
Private Declare Function GetVolumeInformation Lib \"kernel32\" Alias \"GetVolumeInformationA\" (ByVal lpRootPathName As String, ByVal lpVolumeNameBuffer As String, ByVal nVolumeNameSize As Long, lpVolumeSerialNumber As Long, lpMaximumComponentLength As Long, lpFileSystemFlags As Long, ByVal lpFileSystemNameBuffer As String, ByVal nFileSystemNameSize As Long) As Long
Private Sub Command1_Click() Dim lSerial As Long Dim lRet As Long, aRoot$, aVN$, lSerial As Long, lMaxFileName As Long Dim lFlags As Long, aFN$, a$ aRoot$ = Text1.Text \' Textbox med f.eks. C:\\ aVN$ = Space$(255) aFN$ = Space$(255) lRet = GetVolumeInformation(aRoot$, aVN$, Len(aVN$), lSerial, lMaxFileName, lFlags, aFN$, Len(aFN$))
Label1.Caption = lserial End Sub
Her får du mange nyttige informationer om din harddisk
JA brian der var en fejl i dit men jeg har fåde det til at virke men husk lige at rette det efter..
Private Sub Command1_Click() Dim lSerial As Long Dim lRet As Long, aRoot$, aVN$ ,lMaxFileName As Long Dim lFlags As Long, aFN$, a$ aRoot$ = Text1.Text \' Textbox med f.eks. C:\\ aVN$ = Space$(255) aFN$ = Space$(255) lRet = GetVolumeInformation(aRoot$, aVN$, Len(aVN$), lSerial, lMaxFileName, lFlags, aFN$, Len(aFN$))
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.