|
-
Aug 12th, 2007, 12:36 AM
#1
Thread Starter
New Member
How to Burn CD using Visual Basic 6??
hi..im a newbie here..i really need help.. does anyone here has Coding In Visual Basic 6 to burn file to CDRW.. i have tried XPburnObj.dll function n copy to the windows system32 folder and register it in Command Prompt >> " regsvr32 XPburnObj.dll " after the registration..i create a new application in Visual Basic 6 using Std exe and load a form and then drag a command button in the form and put the below code in it..i hv locate a file which is called test.txt in C: drive (based on the coding) you can pick any file and just rename it to test and save it in notepad as text file(... .txt)
Dim foo As Object
Private Sub Command1_Click()
Set foo = CreateObject("BaydenBurn.XPBurn")
MsgBox ("Is XP Burning ready: " & foo.Equipped)
MsgBox ("Burn staging area: " & foo.BurnArea)
MsgBox ("Add file1: " & foo.addfile("C:\test.txt"))
foo.startburn
End Sub
there is no errors but the burning never start..plz help me..
Last edited by warknee; Aug 12th, 2007 at 09:50 AM.
-
Aug 12th, 2007, 04:16 AM
#2
Re: How to Burn CD using Visual Basic 6??
I have just tried the code below to burn all the Ogg files I had in D\:Temp, worked fine. Instead of create object, I added the reference to 'BaydenBurn Library for XPBurn' under 'Project - References'
Code:
Option Explicit
Private Brn As XPBurn
Private Sub Form_Load()
Dim Path As String
Set Brn = New XPBurn
Path = Dir("D:\Temp\*.ogg")
While Path <> ""
Brn.AddFile ("D:\Temp\" & Path)
Path = Dir()
Wend
Brn.StartBurn
End Sub
-
Aug 12th, 2007, 05:25 AM
#3
Thread Starter
New Member
Re: How to Burn CD using Visual Basic 6??
thanks for ur help steve...
the coding is ok..but the file is just ready to be written...and not currently on the CD ..how to solve this? or maybe my CD-RW is damage..i hv erase all data in it using nero before start the burning process..
-
Aug 12th, 2007, 05:37 AM
#4
Hyperactive Member
Re: How to Burn CD using Visual Basic 6??
Try just copying a file through windows explorer. If that works then your CD is ok and it is a code problem.
-
Aug 12th, 2007, 05:43 AM
#5
Re: How to Burn CD using Visual Basic 6??
The dll XPBurn is only a wrapper to Windows XP's Cd writer. It does nothing more than enable a VB programme to add the files to the XP CD writer list. From then on you have to push the write button as you normally would under XP. For actual CD burning try looking at the VBAccelerator site.
http://www.vbaccelerator.com/home/NE...Ds/article.asp
-
Aug 12th, 2007, 06:17 AM
#6
Lively Member
Re: How to Burn CD using Visual Basic 6??
from where can i have this file: XPburnObj.dll???
-
Aug 12th, 2007, 06:20 AM
#7
Re: How to Burn CD using Visual Basic 6??
-
Aug 12th, 2007, 06:35 AM
#8
Lively Member
Re: How to Burn CD using Visual Basic 6??
i got this error while adding the reference to vb2005:
[EDIT] prbloem solved by registring the dll...
Last edited by extreme.aly; Aug 12th, 2007 at 06:42 AM.
-
Aug 12th, 2007, 09:23 AM
#9
Thread Starter
New Member
Re: How to Burn CD using Visual Basic 6??
Steve..it works.. i juz restart my PC n open VB app n start the burning process.. my CD is OK ..thank you so much.. but how to HIDE the CD writng wizard windows from start to end process??
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|