منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب
فتح واغلاق محرك الأقراص - نسخة قابلة للطباعة

+- منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب (http://vb4arb.com/vb)
+-- قسم : الأقسام التعليمية - المنتدى القديم (http://vb4arb.com/vb/forumdisplay.php?fid=90)
+--- قسم : مكتبة أكواد المنتدى (http://vb4arb.com/vb/forumdisplay.php?fid=111)
+---- قسم : مكتبة أكواد .net (http://vb4arb.com/vb/forumdisplay.php?fid=117)
+---- الموضوع : فتح واغلاق محرك الأقراص (/showthread.php?tid=6147)



فتح واغلاق محرك الأقراص - RaggiTech - 17-10-12

كاتب الموضوع : AhmedEssawy


كود :
Imports System.Runtime.InteropServices
Imports System.Text
...

Public Shared Sub Main()
Dim result As Integer = mciSendString("set cdaudio door open", Nothing, 0, IntPtr.Zero)
result = mciSendString("set cdaudio door closed", Nothing, 0, IntPtr.Zero)
End Sub

Protected Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal mciCommand As String, ByVal returnValue As StringBuilder, ByVal returnLength As Integer, ByVal callback As IntPtr) As Integer