QB64 Phoenix Edition
NewBie Question - Printable Version

+- QB64 Phoenix Edition (https://qb64phoenix.com/forum)
+-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1)
+--- Forum: Code and Stuff (https://qb64phoenix.com/forum/forumdisplay.php?fid=3)
+---- Forum: Help Me! (https://qb64phoenix.com/forum/forumdisplay.php?fid=10)
+---- Thread: NewBie Question (/showthread.php?tid=4084)



NewBie Question - niteflyer - 11-06-2025

I'm having a heck of a time figuring out the differences between CLS 0, CLS 1, and CLS 2.Could someone post a working snippet demonstrating the application of the 3? (NO EXPLANATION NEEDED-just a demo snippet proving the DIFFERENCES IN APPLICATION. 
Thank you.

niteFlyer


RE: NewBie Question - Petr - 11-06-2025

Hi. Here is an example of how to delete only the graphics (the gray block). Before using CLS, you must set the graphics viewport with the View command.

Code: (Select All)

Screen 13

Line (0, 0)-(100, 100), 25, BF
_PrintString (200, 10), "Text"
_PrintString (200, 50), "Press key"
Sleep
View (0, 0)-(100, 100)
Cls 1



RE: NewBie Question - Petr - 11-06-2025

Code: (Select All)

Screen 13

View Print 1 To 3
View (0, 20)-(100, 100)
Line (0, 0)-(100, 100), 25, BF
Locate 1: Print "Text"
Locate 2: Print "Press key"
Sleep
Cls 2 'try here 1 or 0