'=========================================================================== ' Subject: SCREEN SAVER/PASSWORD PROGRAM Date: 03-22-97 (14:48) ' Author: Nick Lala Code: QB, QBasic, PDS ' Origin: dork1@toke.com Packet: MISC.ABC '=========================================================================== ' *°°ħħ²²: LoCkOuT :²²ħħ°°* ' This is my first ACTUAL program...I'm just learning QBasic so it's not much... ' This is a very simple program but I learned alot from it...maybe u will too.. ' Be sure to look for more and much better programs soon... ' Please send my all your thoughts and comments... ' By NiCk LaLa (dork1@toke.com) DECLARE SUB PasswordSub () DECLARE SUB WrongPass () CLS ' Clears screen. SCREEN 12 ' High Resolution. LOCATE 14, 29 ' Where the words go. FOR i% = 1 TO 700 ' How many pixels PSET (i%, 220), 7 ' to move across the screen. PSET (i%, 210), 8 FOR delay% = 1 TO 500 ' How fast it goes. NEXT delay% NEXT i% SLEEP 1 ' How long it pauses. PRINT "ScreenSaver By Nick Lala" ' Prints on the screen. SLEEP 1 DO ' Do the do....for your loop. FOR j% = 100 TO 300 RANDOMIZE TIMER ' Makes Random Numbers. x% = INT(RND * 600) + 1 y% = INT(RND * 600) + 1 c% = INT(RND * 15) + 1 CIRCLE (j%, x%), y%, c% ' Random Circle Sizes. LINE (y%, x%)-(x%, y%), c%, BF ' Random Sized/Filled Circles. FOR delay% = 1 TO 200: NEXT delay% NEXT j% LOOP UNTIL INKEY$ = CHR$(27) ' Keeps going until ESCAPE is pressed. CALL PasswordSub ' Goes to my subroutine PasswordSub. END SUB PasswordSub ' My subroutine PasswordSub. 10 SCREEN 12 ' I like high resolution. CLS checkpass$ = "nicklala" ' Defines what the password is. LOCATE 5, 14 INPUT "Enter Password: ", password$ ' Where the user types in the password. IF password$ = checkpass$ THEN ' Checks to see if the password is right. CLS LOCATE 14, 35 PRINT "Nick Lala" LOCATE 16, 33 PRINT "dork1@toke.com" SLEEP 1 END ' Ends the program. ELSE ' The "other" option. CLS SCREEN 1 ' Low resolution is cool too. VIEW (10, 10)-(300, 180), , 2 ' Makes cool(and easy) squares.. VIEW (80, 80)-(250, 100), , 1 ' My other square LOCATE 12, 16 PRINT "YoU'rE WrOnG!" SLEEP 1 CALL WrongPass ' Goes back to screensaver. END IF END SUB SUB WrongPass ' My subroutine WrongPass. CLS ' This is all the same stuff SCREEN 12 ' as the main code. LOCATE 14, 25 FOR i% = 1 TO 700 PSET (i%, 220), 7 PSET (i%, 210), 8 FOR delay% = 1 TO 500 NEXT delay% NEXT i% SLEEP 1 PRINT "**You Have Entered The Wrong Password**" SLEEP 1 DO FOR j% = 100 TO 300 RANDOMIZE TIMER x% = INT(RND * 600) + 1 y% = INT(RND * 600) + 1 c% = INT(RND * 15) + 1 CIRCLE (j%, x%), y%, c% LINE (y%, x%)-(x%, y%), c%, BF FOR delay% = 1 TO 200: NEXT delay% NEXT j% LOOP UNTIL INKEY$ = CHR$(27) CALL PasswordSub ' Take another stab at it. END END SUB