Page 1 of 1

CD Menu Routines

Posted: Tue Oct 04, 2005 4:20 pm
by cbailey
Not wanting to re-invent the wheel (Ok, being the lazy sort...), I was wondering if anyone has, or knows of, source code to make a menu for a CD-Rom? Specifically, I've got a lot of pictures that would make good wallpapers, and I wanted to make an autostart CD to distribute that would show all the pictures, give information about each one, and allow one to simply click a button to install the picture as a wallpaper. I've seen utilities that do this, but they aren't too customizable.

Posted: Tue Oct 04, 2005 5:33 pm
by Killswitch
Flash/Actionscript is probally better for this rot of job. Unless you write it via the screen and sprite commands.

Posted: Tue Oct 04, 2005 6:02 pm
by netmaestro
What you want to do is quite easy. This part is not unique to PureBasic, it is just "general windows programming knowledge". Create a text file named "Autorun.inf" and put the following text in it (substituting the my's with the actual names of course) and place it on your distribution CD:

[autorun]
OPEN=myprogram.EXE
ICON=myicon.ICO

This part is PB. You will write a program to be opened that is of your own design which may include menuing, image display, possible RunProgram(), the sky's the limit. With the .inf file present on the CD, your program will be executed upon the user inserting the CD. Have fun!

P.S. if you want a quick way to set desktop wallpaper, this will do it:

paper.s = "d:\myfolder\mybmp.bmp"
SystemParametersInfo_(#SPI_SETDESKWALLPAPER,0,@paper,#SPIF_UPDATEINIFILE)

however if you want full control you will set the \Control Panel\Desktop subkey in the HKEY_CURRENT_USER registry key with the appropriate values.