QB64 Team Software > InForm Discussion

New screen - How?

(1/2) > >>

Mad Axeman:
Let's say you have created your screen, it's done it's bit and then you need another new screen with completely different inputs. Is that possible?

SMcNeill:
Easily doable.


FirstScreen = _NEWIMAGE(640,480,32)
SecondScreen = _NEWIMAGE(640, 480, 32)

'Do stuff on first screen
SCREEN FirstScreen
CLS, _RGB32(0, 0, 255)
SLEEP

'Phew!  I did a lot and now I'm done.
'Go to second screen
SCREEN SecondScreen

Mad Axeman:
That's fine in plain QB64 but would it work the same with Inform? I haven't played around with it yet but looking at the video about creating a simple word search prog then I can't see how you would design the two screens in Inform and then integrate them into 1 QB64 prog??

Petr:
I think, it is none problem, if you use more screens as virtual screens as in this example. For writing points (and text) to this virtual screens use _DEST, for reading colors using POINT from this screen use _SOURCE. This screens does not have to  be visible and you can making with them as with normal images.


--- Code: QB64: ---Screen1 = _NewImage(640, 480, 32)Screen2 = _NewImage(640, 480, 32)$Color:32_Dest Screen1Cls , Yellow_PrintString (100, 240), "This is Screen 1"_Dest Screen2Cls , Red_PrintString (440, 240), "This is Screen 2" DefaultScreen = _NewImage(1980, 1050, 32)Screen DefaultScreenDo    _Dest Screen1    Locate 1, 1: Print Time$ 'works on unvisible screen1 - print time$     _Dest Screen2    Circle (Rnd * 640, Rnd * 480), 10, _RGB32(255 * Rnd, 255 * Rnd, 255 * Rnd) 'works on unvisible Screen2 - draw circle     _Dest 0 ' 0 is always visible SCREEN     _PutImage (0, 0), Screen1, 0 'place first screen as image to visible screen    _PutImage (1980 / 2, 0), Screen2, 0 'place second screen as imge to visible screen     _Display    _Limit 20Loop 

Qwerkey:
I rather think that @Mad Axeman is correct here.  In Inform, you can only have the one screen open.  Everything has to be done in the one Inform window.  The Master (@FellippeHeitor) will need to give the Intellignt Answer.

Navigation

[0] Message Index

[#] Next page

Go to full version