|
Изменить метку диска/устройства |
|
|
Добавьте 1 Command Button на форму Private Declare Function SetVolumeLabel Lib "kernel32" Alias
"SetVolumeLabelA" (ByVal lpRootPathName As String, ByVal lpVolumeName As String)
As Long
Private Sub Command1_Click()
'replace the "d:\" below with the drive you want to change its label
'replace the "MyNewLabel" below with the drive new label
If SetVolumeLabel("d:\", "MyNewLabel") = 0 Then
MsgBox "An Error occured while trying to change drive label", vbCritical,
"Error"
End If
End Sub
|
|
|
|
|
|
|