I want to go from fullscreen to window mode and when i draw a picture it disappear when i change mode ... i'm forced to load it again. How to do to not have to load it again ?
(use any bitmap instead of barretitre01.bmp you want)
Rem * Title : Windows Control
Rem * Author : DBS-LB
Rem * Date : June 2001
rem ==========================================
rem DARK BASIC EXAMPLE PROGRAM 6
rem ==========================================
rem This program will use the Windows Controls
rem ------------------------------------------
sync on
rem added
load_image("barretitre01.bmp",1);
rem User Prompt
cls : center text 320,240,"Automatic Control of the Application Window"
paste image 1,10,300
sleep 2000
rem Activate windows mode
set window on
rem User Prompt
cls : center text 320,240,"Welcome to Windows Mode"
paste image 1,10,300
sleep 2000
end
` Fonction pour charger des fichiers images
function load_image(file$,imagenumber)
` On charge le fichier dans le bitmap
load bitmap file$,1
` On récupere la largeur pour pouvoir faire une copie dans une image
width=bitmap width(1)
` On récupere la hauteur pour pouvoir faire une copie dans une image
height=bitmap height(1)
` On copie le bitmap dans l'image
get image imagenumber,0,0,width,height
` On enleve de la mémoire le bitmap
delete bitmap 1
` Fin de la fonction
endfunction