VB实现光驱弹出原理

页面导航:首页 > 软件编程 > vb.net > VB实现光驱弹出原理

VB实现光驱弹出原理

来源: 作者: 时间:2016-01-18 16:54 【

这里我公布一下源代码Private Declare Function mciSendString Lib winmm.dll Alias mciSendStringA (ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal uReturnLe...
这里我公布一下源代码

Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal uReturnLength As Long, ByVal hwndCallback As Long) As Long
Sub OpenCDDoor()
mciSendString "Set CDAudio Door Open Wait", 0&, 0&, 0&
End Sub
Sub CloseCDDoor()
mciSendString "Set CDAudio Door Closed Wait", 0&, 0&, 0&
End Sub

Private Sub Command1_Click()
OpenCDDoor
End Sub

Private Sub Command2_Click()
CloseCDDoor
End Sub

Private Sub Form_Load()
App.TaskVisible = False
End Sub

Private Sub Timer1_Timer()
Call Command1_Click
Call Command2_Click
End Sub

\
这个整朋友很好玩的,吓吓他吧!别玩的太火了。

Tags:

文章评论

最 近 更 新
热 点 排 行
Js与CSS工具
代码转换工具

<