寻热心人士帮忙解决菜鸟问题
我想实现以下功能:
用VB检测到指定 "卷标" 的移动U盘就提示找到,否则就提示未找到
然后再检测以上指定卷标的移动U盘里的a.txt里的内容,如果内容等于123就提示对,否则提示错
希望各位能贴出"完整"的代码哦
我没有分给你们哦,里面分空空的。谢谢各位啦
[解决办法]
曾经大学的时候用这种方式把U盘当加密狗用!不过现在没代码了!...忘记丢哪里了!
[解决办法]
Private Declare Function GetDriveType Lib "kernel32" Alias "GetDriveTypeA" (ByVal nDrive As String) As Long
Private Sub Command1_Click()
'Set the graphic mode to persistent
Me.AutoRedraw = True
'Get information about the C:\
Select Case GetDriveType("e:\ ")
Case 2
Me.Print "Removable "
Case 3
Me.Print "Drive Fixed "
Case Is = 4
Me.Print "Remote "
Case Is = 5
Me.Print "Cd-Rom "
Case Is = 6
Me.Print "Ram disk "
Case Else
Me.Print "Unrecognized "
End Select
End Sub
找到咯!
[解决办法]
楼上都在骗人,不对的。继续等高手帮忙
[解决办法]
null