- ' Graphic viewport with absolute cohordinate 
- MakeG ' this draws in absolute cohordinates 
- MakeG ' also this draws at absolute cohordinates  --> graphic is made on previous port 
- VIEW (1, 101)-(200, 150), 1, 4 ' viewport3 
- MakeG ' this draws at relative cohordinate of the viewport 
- VIEW (201, 1)-(400, 50), 3, 5 ' viewport4 
- WINDOW SCREEN(1, 1)-(200, 50) ' this set a different cohordinates that mimic those of viewport1 
- MakeG ' this draws in relative cohordinates 
-   
- PRINT "Press a key to see the emulation of these graphic with _QB64 keywords"- :  SLEEP
 
- ' porting to 32bit with canvas surface to draw 
- A&  = _NEWIMAGE(640, 480, 32) ' main viewport= the whole screen
-   
- ' Bplus colors for 32 bit similar to screen 12 
- DIM SHARED-  qb (15) '<<<<<<<<<< to set up array
 
- qb(0) = &HFF000000 
- qb(1) = &HFF000088 
- qb(2) = &HFF008800 
- qb(3) = &HFF008888 
- qb(4) = &HFF880000 
- qb(5) = &HFF880088 
- qb(6) = &HFF888800 
- qb(7) = &HFFCCCCCC 
- qb(8) = &HFF888888 
- qb(9) = &HFF0000FF 
- qb(10) = &HFF00FF00 
- qb(11) = &HFF00FFFF 
- qb(12) = &HFFFF0000 
- qb(13) = &HFFFF00FF 
- qb(14) = &HFFFFFF00 
- qb(15) = &HFFFFFFFF 
-   
- _DEST-  B&  ' set canvas viewport1
 
- LINE (1, 1)-(200, 50),-  qb (7),-  B 
 
- MakeG2 ' this draws on viewport1 
- _PUTIMAGE (1, 1),-  B& ,-  A&  ' this put on screen (whole original viewport) canvas1
 
-   
- _DEST-  C&  ' set canvas viewport2
 
- LINE (1, 1)-(200, 50),-  qb (14),-  B 
 
- MakeG2 ' this draws on viewport2 . Note here there is no SCREEN option to use absolute cohordinates of screen 
- _PUTIMAGE (1, 51),-  C& ,-  A&  ' this put on screen (whole original viewport) canvas2
 
-   
- _DEST-  D&  ' set canvas viewport3
 
- LINE (1, 1)-(200, 50),-  qb (4),-  B 
 
- MakeG2 ' this draws on viewport3 
- _PUTIMAGE (1, 101),-  D& ,-  A&  ' this put on screen (whole original viewport) canvas3
 
-   
- _DEST-  E&  ' set canvas viewport4
 
- LINE (1, 1)-(200, 50),-  qb (5),-  B 
 
- MakeG2 ' this draws on viewport4 
- _PUTIMAGE (201, 1),-  E& ,-  A&  ' this put on screen (whole original viewport) canvas4
 
-   
- PRINT "Press a key to quit the emulation of these graphic with _QB64 keywords"- :  SLEEP
 
-   
-   
-     LINE (10, 2)-(60, 18), 15,-  BF 
 
-   
-     LINE (10, 2)-(60, 18),-  qb (15),-  BF 
 
-