07-08-2024, 03:40 AM
Hi
this is a first raw example to get multiscreen effect on the screen.
Multiscreen in this videomusic
you can download images from google search or use those posted here.
Happy Coding!
this is a first raw example to get multiscreen effect on the screen.
Code: (Select All)
Const Tot = 4, One = 1, Two = 2, Three = 3
Dim screens(One To Tot) As Long, Movies(One To Three) As Long
If _FileExists("QB64bee.jpeg") Then Movies(One) = _LoadImage("QB64bee.jpeg", 32)
If _FileExists("QB64.jpeg") Then Movies(Two) = _LoadImage("QB64.jpeg", 32)
If _FileExists("QB64pe.jpg") Then Movies(Three) = _LoadImage("QB64pe.jpg", 32)
screens(Tot) = _NewImage(1000, 700, 32)
Screen screens(Tot)
_Title "Multiscreen"
_ScreenMove 1, 1
For c% = 1 To 3
_PutImage , Movies(c%), screens(Tot)
_Delay 1
Next c%
Randomize Timer
Dim k(One To Three) As Integer, h(One To Three) As Integer
While InKey$ = ""
Cls
_PutImage (20 + k(One), 20 + h(One))-(333, 330), Movies(One), screens(Tot)
_PutImage (20 + k(Two), 370 + h(Two))-(333, 680), Movies(Two), screens(Tot)
_PutImage (350 + k(Three), 20 + h(Three))-(980, 680), Movies(Three), screens(Tot)
_Delay .1
_Display
For c% = One To Three
k(c%) = Int(Rnd * 4)
h(c%) = Int(Rnd * 5)
Next c%
Wend
_Delay .5
While InKey$ = ""
Cls
_PutImage (20 + k(One), 20 + h(One))-(333, 330), Movies(One), screens(Tot)
_PutImage (20 + k(Two), 370 + h(Two))-(333, 680), Movies(One), screens(Tot)
_PutImage (350 + k(Three), 20 + h(Three))-(980, 680), Movies(One), screens(Tot)
_Delay .1
_Display
For c% = One To Three
k(c%) = Int(Rnd * 4)
h(c%) = Int(Rnd * 5)
Next c%
Wend
End
Multiscreen in this videomusic
you can download images from google search or use those posted here.
Happy Coding!