littlechikon Posted February 4, 2009 Report Posted February 4, 2009 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 =/
iBotPeaches Posted February 4, 2009 Report Posted February 4, 2009 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.
littlechikon Posted February 4, 2009 Author Report Posted February 4, 2009 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
iBotPeaches Posted February 4, 2009 Report Posted February 4, 2009 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.
littlechikon Posted February 4, 2009 Author Report Posted February 4, 2009 (edited) 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 February 4, 2009 by SmokiestGrunl
SmokiestGrunl Posted February 4, 2009 Report Posted February 4, 2009 alright thanks =] where can i find this Slip fellow? =D Dark Slipstream - Global Mod
iBotPeaches Posted February 4, 2009 Report Posted February 4, 2009 I noticed him of this topic. Give him awhile.
Dark Slipstream Posted February 5, 2009 Report Posted February 5, 2009 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.
littlechikon Posted February 5, 2009 Author Report Posted February 5, 2009 (edited) 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 February 5, 2009 by littlechikon
Ominous Posted February 22, 2009 Report Posted February 22, 2009 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.
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now