Myanmar IT Resource Forum
Myanmar IT Resource Forum

You are not connected. Please login or register

View previous topic View next topic Go down  Message [Page 1 of 1]

sHa92


Founder



Founder
CD Tray ကို ဖြင့္ခ်င္တယ္ဆုိရင္ေတာ့ က်ေနာ္တုိ႔ဟာပထမဆုံးအေနနဲ႔ Application ရဲ႕ API ကို အရင္ဆုံး သတ္မွတ္ေပးရပါမယ္။
အဲဒီ့လုိ သတ္မွတ္တာကေတာ့ ေအာက္က Code နဲ႔ပါ။
Code:
Declare Function s Lib "winmm.dll" Alias "mciSendStringA" (ByVal mess As String, ByVal retVal As String, ByVal s As Integer, ByVal so As Integer) As Integer



CD Tray ကို ဖြင့္ခ်င္ရင္ေတာ့

Code:
Dim exits As Boolean = False

Public Function Open() As Integer

        Dim ret As String

        ret = New String(CChar(" "), 255)

        Open = s("Set CDAudio Door Open Wait", ret, 0&, 0&)

End Function
CD Tray ကို ပိတ္ခ်င္ရင္

Code:
Public Function Closes() As Integer

          Dim strReturn As String

          strReturn = New String(CChar(" "), 255)

          Closes = s("Set CDAudio Door Closed Wait", strReturn, 0&, 0&)

End Function



Change We Need!
http://www.myanmaritresource.info

View previous topic View next topic Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum

 

Free forum | © PunBB | Free forum support | Contact | Report an abuse | Free forum