Private mdiHost As MdiClient
Private backgrounds As Image() = {My.Resources.MdiBackgroundImage1, _
My.Resources.MdiBackgroundImage2, _
My.Resources.MdiBackgroundImage3}
Private backgroundIndex As Integer = -1
Private Sub Form1_Load(ByVal sender As Object, _
ByVal e As EventArgs) Handles MyBase.Load
For Each ctl As Control In Me.Controls
If TypeOf ctl Is MdiClient Then
Me.mdiHost = DirectCast(ctl, MdiClient)
Exit For
End If
Next ctl
Me.SetBackgroundImage()
End Sub
Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As EventArgs) Handles Timer1.Tick
Me.SetBackgroundImage()
End Sub
Private Sub SetBackgroundImage()
Me.backgroundIndex += 1
If Me.backgroundIndex = Me.backgrounds.Length Then
Me.backgroundIndex = 0
End If
Me.mdiHost.BackgroundImage = Me.backgrounds(Me.backgroundIndex)
End Sub