Jump to content

cbox


Recommended Posts

Posted
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 =/
Posted

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.

Posted (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 by SmokiestGrunl
Posted

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.

Posted (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 by littlechikon
  • 3 weeks later...
Posted

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.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...