Italian Come far caricare all'utente un'immagine a scelta

Discussion in 'Italian Forum' started by SSDM71, Jan 21, 2015.

  1. SSDM71

    SSDM71 Active Member Licensed User

    Mi chiedo come si fa a caricare un immagine da applicazione con b4a, grazie!
     
  2. udg

    udg Expert Licensed User

    Qualcosa del genere:
    Code:
    Dim cc As ContentChooser
    Dim p as Panel
    Dim TileImg As Bitmap
    ..
    Dim btn1 As Button
    btn1.Initialize(
    "btnimg")
    btn1.Text=
    "selezona immagine"
    p.AddView(btn1, 
    10dip10dip200dip200dip)
    ...

    Sub btnimg_click
      cc.Initialize(
    "CC")
       cc.Show(
    "image/*","Choose image")
    End Sub

    Sub CC_Result(Success As Boolean, Dir As String, FileName As String)
      
    If Success = True Then
         TileImg.InitializeSample(Dir,FileName,
    800dip,800dip
      
    Else
        
    Msgbox("Image failed to load.","Error")
      
    End If
    End Sub
     
    ellpopeb4a likes this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice