Are you talking about making your own screen saver? There are actually just normal programs which have been renamed as .scr, and they have a few standard control inputs.
A quick search on google should should turn up the skeleton code to desgin your own screensaver.