VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Really Simple Load Custom Resource

by Zani (2 Submissions)
Category: Files/File Controls/Input/Output
Compatability: Visual Basic 5.0
Difficulty: Beginner
Date Added: Wed 3rd February 2021
Rating: (4 Votes)

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

Download Really Simple Load Custom Resource

Download Really Simple Load Custom Resource (4 KB)

Really Simple Load Custom Resource Comments

No comments have been posted about Really Simple Load Custom Resource. Why not be the first to post a comment about Really Simple Load Custom Resource.

Post your comment

Subject:
Message:
0/1000 characters