Jump to content

Open File Dialog


scorch
 Share

Recommended Posts

Para isso usas a propriedade .Filter = "<texto a aparecer>|*.<extensão>"

Para um:

.Filter = "ficheiro png(*.png)|*.png"

Para os quatro:

.Filter = "ficheiro png(*.png)|*.png|ficheiro jpg(*.jpg)|*.jpg|ficheiro gif(*.gif)|*.gif|ficheiro jpeg(*.jpeg)|*.jpeg"

Colocas dentro do:

With OpenFileDialog1
' Aqui
End With

EDIT:

Noutro local do programa:

OpenFileDialog1.Filter = "aqui"

dreams.each do |dream|

   dream.make_it_happen

end

Link to comment
Share on other sites

Private Sub frm_gerir_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        With ofd_avatar.Filter = "ficheiro png(*.png)|*.png|ficheiro jpg(*.jpg)|*.jpg|ficheiro gif(*.gif)|*.gif|ficheiro jpeg(*.jpeg)|*.jpeg"
        End With
    End Sub

Eu coloquei isto e consigo ver e abrir outros ficheiros à mesma.  😉

PS: Não respondo a perguntas por mensagem que podem ser respondidas no fórum.

Link to comment
Share on other sites

Experimenta assim:

Private Sub frm_gerir_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        With ofd_avatar
             .Filter = "ficheiro png(*.png)|*.png|ficheiro jpg(*.jpg)|*.jpg|ficheiro gif(*.gif)|*.gif|ficheiro jpeg(*.jpeg)|*.jpeg"
        End With
End Sub

dreams.each do |dream|

   dream.make_it_happen

end

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.