News:

Welcome to RetroCoders Community

Main Menu

simple Text Graphic Screen Show

Started by ron77, Oct 12, 2022, 04:54 PM

Previous topic - Next topic

ron77

Hello, here is a code that displays a short "happy birthday/new year/event-of-your-choice" on a graphic screen with colored text... the original idea was taken long ago when I tried to make a "happy new year 2020" in freebasic however that short demo was lost (like with the whole covid years)

Here is the code:

screenres 800,600,32
width 800\8 , 600 \16

enum colors
	red = rgb(255,0,0)
	green = rgb(0,255,0)
	blue = rgb(0,0,255)
	color4 = rgb(10,58,120)
	color5 = rgb(70, 110,0)
	color6 = rgb(0, 34, 80)
End Enum

dim as string msg1, msg2, msg3
input "enter event: ", msg1
input "enter name: ", msg2
input "enter year: ", msg3

var message1 = "Happy " + msg1 + " to all of us!!!"
var message2 = "congratulations! " + msg3 + " from all of us!!!"
var message3 = "may this year - " + msg3 + " be a good happy one for all!!!"

var row = 25, col = 10
dim as long i, j
cls
for i = 0 to 5
	locate row + i, col
	color colors.red :print message1
	sleep 500
	cls
Next
sleep 500
cls
for i = 0 to 5

	locate 20 - i, col
	color colors.blue : print message2
	sleep 500
	cls

Next
cls
sleep 500
for i = 0 to 5

	locate 15 + i, 15
	color colors.green : print message3
	sleep 500
	cls

Next
cls
sleep 500
print "done!"

sleep

johnno56

May your journey be free of incident.  Live long and prosper.