Public Sub SetIcon(ByVal Drivename As String, ByVal IconFileName As String)
If IO.File.Exists(IconFileName) = True And IO.Path.GetExtension(IconFileName) = ".ico" Then
My.Computer.Registry.SetValue("hKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\" & Drivename & "\Defaulticon", "", IconFileName)
Else
MsgBox("الملف غير موجود أو نوعه غير معروف", MsgBoxStyle.Critical, "خطأ")
End If
End Sub
Please SUBSCRIBE to get new articles directly into your Email inbox!
If IO.File.Exists(IconFileName) = True And IO.Path.GetExtension(IconFileName) = ".ico" Then
My.Computer.Registry.SetValue("hKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\" & Drivename & "\Defaulticon", "", IconFileName)
Else
MsgBox("الملف غير موجود أو نوعه غير معروف", MsgBoxStyle.Critical, "خطأ")
End If
End Sub
Please SUBSCRIBE to get new articles directly into your Email inbox!
تعليقات
إرسال تعليق