'=========================================================================== ' Subject: CHANGE SCREEN AND COLORS W/OUT Date: 02-26-99 (17:41) ' Author: Alexander Meyer Code: QB, QBasic, PDS ' Origin: Meyer.Karl@t-online.de Packet: GRAPHICS.ABC '=========================================================================== ' //// ' 0(o o)0 '-------------------------ooO (_) Ooo--------------------- ' SCRSIZE.BAS -- Written in QuickBasic 4.5 ' ' Name: Change screen size and color ' Author: Alexander Meyer ' Date: 02-22-1999 ' Description: Change the height and colors of the screen ' using OUT. I'm not sure if this works with ' every graphics card, but I think so. ' 'For questions or comments mail to: Meyer.Karl@t-online.de '-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Menu: SCREEN 0: CLS PRINT "Choose what you want:" PRINT PRINT "1 = Demo 1 (Change screen size)" PRINT "2 = Demo 2 (Change colors)" PRINT "0 = Exit" PRINT INPUT "Please press 1 or 2: ", WhatYouWant% IF WhatYouWant% = 1 THEN GOTO Demo1 IF WhatYouWant% = 2 THEN GOTO Demo2 GOTO Menu Demo1: 'Demo 1 (Change screen size) SCREEN 13 LINE (1, 1)-(319, 199), 4, B LOCATE 3, 2: PRINT "Press any key" SLEEP 'i * 8 will make the screen *very* small FOR i = 1 TO 600: OUT &H3C2, i * 2: NEXT i SLEEP FOR i = 1 TO 600: OUT &H3C2, i * 6: NEXT i 'You can't write anything SLEEP 'on the screen now! SCREEN 12: SCREEN 13 'Now you can write something again! END Demo2: 'Demo 2 (change colors) SCREEN 13 DEFINT A-Z FOR i% = 1 TO 255 a = a - 1: B = B + 1 LINE (a + 155, a + 90)-(B + 165, B + 100), i%, B 'Take LINE or CIRCLE 'CIRCLE (155, 90), B, i% 'or whatever you want. NEXT i% LOCATE 1, 1: PRINT "Now the colors are changed. Press a key." SLEEP FOR p = 1 TO 600: OUT &H3C7, p - 100: OUT &H3C9, p: NEXT p: SLEEP FOR p = 1 TO 600: OUT &H3C9, p: NEXT p: SLEEP FOR p = 600 TO 1 STEP -1: OUT &H3C9, p: NEXT p: SLEEP FOR p = 900 TO 1 STEP -1: OUT &H3C9, p / 5: NEXT p: SLEEP FOR p = 600 TO 1 STEP -1: OUT &H3C9, p * 5: NEXT p: SLEEP FOR p = 1 TO 800: OUT &H3C9, p * 5: NEXT p: SLEEP 'There are many other ways to change colors with ports '&H3C9, &H3C8 and &H3C7 'Just try it out! END