Here's the next bit of my code,
The timer's code:
and in the form's load event:Code:Private Sub Timer1_Timer() Image1.Picture = GetPictureFromResource(F_ID(My_ctr)) If (My_ctr < 5) Then My_ctr = My_ctr + 1 Else My_ctr = 0 End If End Sub Public Function GetPictureFromResource(F_ResourceID As Integer) As IPictureDisp Dim bytArr() As Byte Dim intFFN As Integer Dim strPath As String bytArr = LoadResData(F_ResourceID, "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 Set GetPictureFromResource = LoadPicture(strPath) Kill strPath End Function
Private Sub Form_Load()
I've loaded the jpeg files into the resource file already.Code:'To make the image control fullscreen Image1.Top = 0 Image1.Left = 0 Image1.Width = Screen.Width Image1.Height = Screen.Height My_ctr = 0 F_ID(0) = "101" F_ID(1) = "102" F_ID(2) = "103" F_ID(3) = "104" F_ID(4) = "105" F_ID(5) = "106" Timer1.Enabled = True Timer1_Timer End Sub
Any ideas????
Thanx.




Reply With Quote