Forum » Programiranje » Vb6
Vb6
jzupevc ::
Ali kdo zna napisat proceduro ali funkcijo ki bi pogledala če je cd v cd-romu željenega imena.
In kako bi odprl Cd in zaprl cd-rom v vb6
Hvala za pomoč
In kako bi odprl Cd in zaprl cd-rom v vb6
Hvala za pomoč
Gandalfar ::
mciSendString('Set cdaudio door open wait', nil, 0, handle);
mciSendString('Set cdaudio door closed wait', nil, 0, handle);
mciSendString('Set cdaudio door closed wait', nil, 0, handle);
StratOS ::
Ali kdo zna napisat proceduro ali funkcijo ki bi pogledala če je cd v cd-romu željenega imena
Kaj si z tem mislil
open/close CD Disk drive string ???
ali misliš na snemanje CD-RW/DVD ???
ja za odpiranje/zapiranje vratc cd-roma ni blema.
Uporabiš API funkcijo mcisendstring/command
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
To velja če imaš recimo en cd-rom, drugače se pa pošpilčkaš z mcisendcommand-om
Public Declare Function mciSendCommand Lib "winmm.dll" Alias "mciSendCommandA" (ByVal wDeviceID As Long, ByVal uMessage As Long, ByVal dwParam1 As Long, ByVal dwParam2 As Any) As Long
Damn, pa še en me je prehitu :)
"Multitasking - ability to f##k up several things at once."
"It works better if you plug it in."
"The one who is digging the hole for the other to fall in is allready in it."
"It works better if you plug it in."
"The one who is digging the hole for the other to fall in is allready in it."
Zgodovina sprememb…
- spremenila: StratOS ()
Gandalfar ::
StratOS: sej ql. Ti kr pomagi. Moja pomoc je taka bolj spartanska. Bi mogu clovk clo pogledat v help kako je deklarirana funkcija.
Sicer pa ubistvu se mi zdi to kr prov. Vsaj ne naredis mu popolnoma vsega...
Sicer pa ubistvu se mi zdi to kr prov. Vsaj ne naredis mu popolnoma vsega...
StratOS ::
That's the things that counts ...
No, to je še vseen easy, ker je vse v MSDN pa na netu tudi.
Sem že mislil, da ga zanima kako z "VB" zapreti CD ... , hja naj mi na to kdo odgovori ... pa brez kakšnih kontrolnikov, sklicov na kakšne inported DLL-jev ...
No, to je še vseen easy, ker je vse v MSDN pa na netu tudi.
Sem že mislil, da ga zanima kako z "VB" zapreti CD ... , hja naj mi na to kdo odgovori ... pa brez kakšnih kontrolnikov, sklicov na kakšne inported DLL-jev ...
"Multitasking - ability to f##k up several things at once."
"It works better if you plug it in."
"The one who is digging the hole for the other to fall in is allready in it."
"It works better if you plug it in."
"The one who is digging the hole for the other to fall in is allready in it."
webblod ::
Gandalfar: A tebe tudi včasih zanese, da zamešaš VB in Delphi?
Meni se to tudi dogaja... Pozna kdo kako zdravilo?
Meni se to tudi dogaja... Pozna kdo kako zdravilo?
There must be a reason, why I'm so damn dissapointed on M$ Visual Basic
WEBblod.NET :: Slovenska programerska scena
WEBblod.NET :: Slovenska programerska scena
Gandalfar ::
webblod: ubistvu me ne zanasa, ker poznam samo Delphi ^_^ Ampak saj ne bi smelo biti kaksnih blaznih razlik..
StratOS: kako mislis zapreti..? mciSendString('Set cdaudio door closed wait', nil, 0, handle); ze to ti zaprne cd predalcek.. ti mislis kot session preko writerja al kako?
StratOS: kako mislis zapreti..? mciSendString('Set cdaudio door closed wait', nil, 0, handle); ze to ti zaprne cd predalcek.. ti mislis kot session preko writerja al kako?
Gandalfar ::
hm ja .. ene komponente bi mogu mal prestudirat. Sicer pa naceloma preko ActiveX komponente, ce hoces v easy. Sicer pa so dllji cist pa kul. Ali morda niso v VB
http://homepages.borland.com/efg2lab/Li...
http://www.componentsource.com/BuyCompo...
100035DOS cdr-utils in Pascalcinek Here is a collection of utilities
for IDE-CD(R/W)-drives.
They are all written in Pascal
and running with DOS.
The sources show how to:
read, write, blank and fixate
data/audio CD(R/W)s.
http://sourceforge.net/snippet/browse.p...
zanimivo kaj zmore google ce mu posvetis kaksno minutko...
http://homepages.borland.com/efg2lab/Li...
http://www.componentsource.com/BuyCompo...
100035DOS cdr-utils in Pascalcinek Here is a collection of utilities
for IDE-CD(R/W)-drives.
They are all written in Pascal
and running with DOS.
The sources show how to:
read, write, blank and fixate
data/audio CD(R/W)s.
http://sourceforge.net/snippet/browse.p...
zanimivo kaj zmore google ce mu posvetis kaksno minutko...
StratOS ::
Ja, jaz pa rajši uporabljam Ahead nero burning rom za to !!!
"Multitasking - ability to f##k up several things at once."
"It works better if you plug it in."
"The one who is digging the hole for the other to fall in is allready in it."
"It works better if you plug it in."
"The one who is digging the hole for the other to fall in is allready in it."
StratOS ::
Seveda je to koda samo za default AudioCDR, če jih maš mal več probaj sledeče :
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
Public Function openCD(ByVal dRv As String) As Long
Dim Alias As String
Dim retval As Long
Alias = "Drive" & dRv
retval = -1 'we need to set retval to anything other then 0
retval = mciSendString("open " & dRv & ": type cdaudio alias " & Alias & " wait", vbNullString, 0&, 0&
retval = mciSendString("set " & Alias & " door open", vbNullString, 0&, 0&
openCD = retval
End Function
Public Function closeCD(ByVal dRv As String) As Long
Dim Alias As String
Dim retval As Long
Alias = "Drive" & dRv
retval = -1 'we need to set retval to anything other then 0
retval = mciSendString("set " & Alias & " door closed", vbNullString, 0&, 0&
retval = mciSendString("close " & Alias, vbNullString, 0&, 0&
closeCD = retval
End Function
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
Public Function openCD(ByVal dRv As String) As Long
Dim Alias As String
Dim retval As Long
Alias = "Drive" & dRv
retval = -1 'we need to set retval to anything other then 0
retval = mciSendString("open " & dRv & ": type cdaudio alias " & Alias & " wait", vbNullString, 0&, 0&
retval = mciSendString("set " & Alias & " door open", vbNullString, 0&, 0&
openCD = retval
End Function
Public Function closeCD(ByVal dRv As String) As Long
Dim Alias As String
Dim retval As Long
Alias = "Drive" & dRv
retval = -1 'we need to set retval to anything other then 0
retval = mciSendString("set " & Alias & " door closed", vbNullString, 0&, 0&
retval = mciSendString("close " & Alias, vbNullString, 0&, 0&
closeCD = retval
End Function
"Multitasking - ability to f##k up several things at once."
"It works better if you plug it in."
"The one who is digging the hole for the other to fall in is allready in it."
"It works better if you plug it in."
"The one who is digging the hole for the other to fall in is allready in it."
Vredno ogleda ...
Tema | Ogledi | Zadnje sporočilo | |
---|---|---|---|
Tema | Ogledi | Zadnje sporočilo | |
» | [C#] Prehajanje na low levelOddelek: Programiranje | 1306 (1062) | krneki0001 |
» | video v c#Oddelek: Programiranje | 1528 (1068) | boss-tech |
» | [C#] Prosim pomagajte! Potrebujem program, ki bi pobiral podatke iz ene straniOddelek: Programiranje | 2735 (2345) | David1994 |
» | API+VBOddelek: Programiranje | 2083 (1787) | webblod |
» | Odpiranje dat.exe v VBOddelek: Programiranje | 2979 (2772) | webblod |