Here you go:
Then call this function like this:Code:Public Sub RunPictureFromResource(pintResourceID As Integer, pPictureBox As PictureBox) Dim bytArr() As Byte Dim intFFN As Integer Dim strPath As String bytArr = LoadResData(pintResourceID, "CUSTOM") strPath = App.Path & IIf(Right(App.Path, 1) = "\", MyPicture.tmp", "\MyPicture.tmp") intFFN = FreeFile Open strPath For Binary As intFFN Put #intFFN, , bytArr Close #intFFN pPictureBox = LoadPicture(strPath) Kill strPath End Sub
Call RunPictureFromResource(101, Picture1)
Where
101 - is a resource ID
Picture1 - is a name of the PictureBox
[Edited by Serge on 08-17-2000 at 09:39 PM]




Reply With Quote