Step 1: Copy this code into DBPro
sync on : color backdrop 0
load dll "User32.dll",1
make memblock 255, 8
make memblock 256, 16
new=call dll(1,"OpenClipboard",0)
my$=call dll(1,"GetClipboardData",1)
old=call dll(1,"CloseClipboard")
delete dll 1
ext$=right$(my$,4)
ok=download(my$,"image"+ext$)
repeat : sync : until ok>0
load image "image"+ext$,1
do
text 20,20, my$
Sprite 1,20,40,1
sync
loop
function download(w$,f$)
if file exist(f$) then delete file f$
load dll "urlmon",1
a=CALL DLL(1,"URLDownloadToFileA",0,w$,f$,0,0)
delete dll 1
ok=(a=0)
endfunction ok
Step 2: Find a BMP or JPG image on the internet. Copy the location of that image using Right Click/ Copy Image Location.
Step 3: Run the DBPro Program.
Credits go to:
Download function by The Full Metal Coder Roxas
Everything else by Me
I'm just learning how to use the User32.dll and came across this clipboard function.
-Mansoor Siddiquie