Results 1 to 9 of 9

Thread: How to Burn CD using Visual Basic 6??

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2007
    Posts
    3

    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.

  2. #2
    Fanatic Member
    Join Date
    Jul 2007
    Location
    Essex, UK.
    Posts
    579

    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

  3. #3

    Thread Starter
    New Member
    Join Date
    Aug 2007
    Posts
    3

    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..

  4. #4
    Hyperactive Member
    Join Date
    Jun 2007
    Posts
    280

    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.

  5. #5
    Fanatic Member
    Join Date
    Jul 2007
    Location
    Essex, UK.
    Posts
    579

    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

  6. #6
    Lively Member
    Join Date
    Jan 2007
    Posts
    95

    Re: How to Burn CD using Visual Basic 6??

    from where can i have this file: XPburnObj.dll???

  7. #7
    Fanatic Member
    Join Date
    Jul 2007
    Location
    Essex, UK.
    Posts
    579

    Re: How to Burn CD using Visual Basic 6??

    http://www.bayden.com/delphi/cdburner.htm

    Remember it is only a wrapper.

  8. #8
    Lively Member
    Join Date
    Jan 2007
    Posts
    95

    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.

  9. #9

    Thread Starter
    New Member
    Join Date
    Aug 2007
    Posts
    3

    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
  •  



Click Here to Expand Forum to Full Width