Jump to content

  •  

  • iBotModz CBox


    Photo

    I need help in VB6


    • Please log in to reply
    9 replies to this topic

    #1 littlechikon

    littlechikon

      Private

    • Members+

    • 36 posts
    • Joined: 16-July 08

    Posted 03 February 2009 - 08:18 PM

    Alright so in VB6 I'm trying to make a button open a file in winrar so that you can extract it to wherever (like what mookey or w/e did in his AIO host booting program) but i have no clue about how to do this. Also is there a place where i can host a .mp3 that will automatically start to stream so i can play music in my program with the wmp.dll? thnx ahead and sorry if i posted in the wrong section i didnt know where else to go =/

    #2 iBotPeaches

    iBotPeaches

      General Grade 6

    • Owner

    • 6,570 posts
    • Joined: 29-July 07
    • Gender:Male
    • Location:Kansas

    Posted 03 February 2009 - 08:33 PM

    Um.. auto un-rar?

    You could just place the files in the main root folder and then do

    Process.Start(aPath & "/blah/filename.exe")

    but, put this in the top

    Private aPath As String = Application.StartupPath()

    Dont know about other.

    #3 littlechikon

    littlechikon

      Private

    • Members+

    • 36 posts
    • Joined: 16-July 08

    Posted 03 February 2009 - 09:31 PM

    but then wouldnt this make it so only i could download it? i wanna be able to have it so other people can unrar it. like have the file in the .exe but extract when someone clicks a certain button

    #4 iBotPeaches

    iBotPeaches

      General Grade 6

    • Owner

    • 6,570 posts
    • Joined: 29-July 07
    • Gender:Male
    • Location:Kansas

    Posted 03 February 2009 - 09:51 PM

    I don't know how to join the files into the program itself, just add them to the directory. Slip's going to have to help you here.

    #5 littlechikon

    littlechikon

      Private

    • Members+

    • 36 posts
    • Joined: 16-July 08

    Posted 04 February 2009 - 08:03 AM

    alright thanks =]

    I don't know how to join the files into the program itself, just add them to the directory. Slip's going to have to help you here.


    where can i find this Slip fellow? =D

    Edited by SmokiestGrunl, 04 February 2009 - 03:07 PM.


    #6 SmokiestGrunl

    SmokiestGrunl

      Australian Retired Staff

    • Retired Staff

    • 3,888 posts
    • Joined: 02-September 07
    • Gender:Male
    • Location:Australia

    Posted 04 February 2009 - 03:08 PM

    alright thanks =]



    where can i find this Slip fellow? =D


    Dark Slipstream - Global Mod

    #7 iBotPeaches

    iBotPeaches

      General Grade 6

    • Owner

    • 6,570 posts
    • Joined: 29-July 07
    • Gender:Male
    • Location:Kansas

    Posted 04 February 2009 - 05:18 PM

    I noticed him of this topic. Give him awhile.

    #8 Dark Slipstream

    Dark Slipstream

      Blue Shadowz Owner

    • Members+

    • 2,829 posts
    • Joined: 19-April 08
    • Gender:Male
    • Location:Canada, ON

    Posted 04 February 2009 - 08:53 PM

    In vb6... uh.

    I'm not sure how to embed in vb6, I think it should be near the top "Resources" or "References", add the file to there.

    In vb9 (2008), open the "My Project", select "Resources", click-drag the file into view, set as "Embedded Resource".


    In the program code for vb9, My.Computer.FileSystem.WriteAllBytes(My.Resources.<filename>.ext) where ext is the extension (if any), and the <filename> is the files name.

    In vb6, I am unsure of how to extract a file, other than embedding it.



    If I get the chance tomorrow, I'll google some vb6 stuff and reply with a more detailed response. Other than this, vb9 is much easier to use.

    I hope this gets you somewhere.

    #9 littlechikon

    littlechikon

      Private

    • Members+

    • 36 posts
    • Joined: 16-July 08

    Posted 04 February 2009 - 09:00 PM

    In vb6... uh.

    I'm not sure how to embed in vb6, I think it should be near the top "Resources" or "References", add the file to there.

    In vb9 (2008), open the "My Project", select "Resources", click-drag the file into view, set as "Embedded Resource".


    In the program code for vb9, My.Computer.FileSystem.WriteAllBytes(My.Resources.<filename>.ext) where ext is the extension (if any), and the <filename> is the files name.

    In vb6, I am unsure of how to extract a file, other than embedding it.



    If I get the chance tomorrow, I'll google some vb6 stuff and reply with a more detailed response. Other than this, vb9 is much easier to use.

    I hope this gets you somewhere.


    k thnx Im about to try this out now and see if it works =]

    EDIT: I tried to bring my program into VB9 but all the coding is different (like opening and closing windows) and Im also learning VB with VB6 in school so i should probably continue using VB6. Let me know if you find anything else on VB6 =]

    Edited by littlechikon, 05 February 2009 - 04:37 PM.


    #10 Ominous

    Ominous

      Recruit

    • Members+

    • 2 posts
    • Joined: 22-February 09

    Posted 22 February 2009 - 10:32 AM

    Hmm, I don't know if you still need help with this. But heres something I worked up real quick.

    Private Sub Form_Load()
    Dim wRAR() As Byte
    Dim MP3() As Byte
    wRAR() = LoadResData("WINRAR", "CUSTOM")
    MP3() = LoadResData("MP3", "CUSTOM")
    
    Open App.Path & "\winrar.exe" For Binary As #1
    	Put #1, , wRAR()
    Close #1
    
    Open App.Path & "\music.mp3" For Binary As #1
    	Put #1, , MP3()
    Close #1
    
    WindowsMediaPlayer1.Url = App.Path & "\music.mp3"
    End Sub
    
    Private Sub Command_Click()
    Shell "winrar.exe file.rar"
    End Sub

    You need to add winrar.exe and your mp3 as resource files and change their ID's accordingly.