(AGK version: 108.16)
Submitted: 2013-08-06 10:41:49
Setvirtualresolution(640,480)
ResetTimer()

ShowChooseImageScreen()
//Loop until and image is selected
Repeat
    Sync()
Until IsChoosingImage()= 0
id=GetChosenImage()
CreateSprite(1,id)
//SetSpriteSize(1,100,-1)
Repeat
    Sync()
Until Timer()>15
End
(AGK version: 108.24)
Submitted: 2015-02-18 20:41:20
rem AGK Application 1.08B13
rem MR

rem image selection

MainLoop()
end

function MainLoop()

    image=SelectImage()
    if image=0
        //was canceled
    else
        //make a Background sprite
        sprite = CreateSprite( image )
        SetSpritesize( sprite, -1,100 )
        setspritepositionbyoffset(sprite,50,50)
    endif

    bntend=1
    AddVirtualButton( bntend,10,10,10 )
    SetVirtualButtonText( bntend, "Exit" )

    do

     if GetVirtualButtonPressed( bntend ) then exit

     Sync()
    loop

    deleteVirtualButton(bntend)

endfunction

function SelectImage()

    if ShowChooseImageScreen()=1 //Ok

     while IsChoosingImage()=1 //Dialog is Open, Wait
       sync()
     endwhile

     image = GetChosenImage() //Get the image

    endif

endfunction image
Help make AGK better by submitting an example for this command!
(All examples are subject to approval)
Login to post an example of your own.