VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Really Simple Load Custom Resource

Zani  (2 Submissions)   Files/File Controls/Input/Output   Visual Basic 5.0   Beginner   Wed 3rd February 2021

I decided to wrote this article after a long time trying to find a way to load custom resources that cant be load as "normal" ... all i can find is really complicated DLL's and huge and confuzing codes ... so i decide to show a really simple way.

I will show how to load an flash animation but you can do this with anything.
I will also put a sample on a ZIP in case that you have some problem with copy and paste
All you have to do is create your resource file as normal puting anything you want (JPG, EXE, SWF, Etc...) as custom resources.
And then write the resource to a file and load it.

Private Sub Form_Load()
Dim M() As Byte
M = LoadResData(1, "SWF")
Open "c:\windows\desktop\m.swf" For Binary Access Write As 1
Put #1, , M
Close 1
SF.Movie = "c:\windows\desktop\m.swf"
End Sub
Private Sub Form_Unload(Cancel As Integer)
Kill "c:\windows\desktop\m.swf"
End Sub

Rate Really Simple Load Custom Resource (4(4 Vote))

Download Really Simple Load Custom Resource

Really Simple Load Custom Resource Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters