cagueca Posted December 7, 2009 at 05:06 PM Report Share #299085 Posted December 7, 2009 at 05:06 PM Boas : Preciso de ajuda para uma combobox .. Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click 'abrir pasta With FolderBrowserDialog1 .RootFolder = Environment.SpecialFolder.Desktop .SelectedPath = "c:\" .Description = "Seleccione a pasta onde se encontram os ficheiros" End With If FolderBrowserDialog1.ShowDialog() = DialogResult.OK Then ComboBox1.Items.Add("aqui nao sei que codigo por para inserir o nome dos ficheiros da pasta que seleccionei") End If End Sub Quando seleccionar o ficheiro o programa vai ler para uma textbox mas isso já esta feito .. Abraço Link to comment Share on other sites More sharing options...
renafi Posted December 7, 2009 at 06:16 PM Report Share #299104 Posted December 7, 2009 at 06:16 PM Mas a partir da FolderBrowserDialog, queres seleccionar vários ficheiros? Então vais ter de criar um objecto do Tipo DirectoryInfo, enviar a pasta seleccionada, e depois criar um ciclo For Each para ires preenchendo a ComboBox com cada um dos ficheiros... Se precisares de mais pormenores, diz 😉 Oracle Certified Professional - AdministraçãoOracle Certified Professional - Pl/sqlMCPD - Microsoft Certified Professional DeveloperMCTS - Microsoft Certified Technology Specialist Link to comment Share on other sites More sharing options...
cagueca Posted December 7, 2009 at 06:26 PM Author Report Share #299105 Posted December 7, 2009 at 06:26 PM sim ao seleccionar a pasta todos os ficheiros que estao nessa pasta vao aparecer na combobox .. Todos eles vao ser ficheiros txt .. Enviar a pasta seleccionada para onde .. ?? Se puderes da ai mais uns promenores .. Obrigado Link to comment Share on other sites More sharing options...
renafi Posted December 7, 2009 at 06:54 PM Report Share #299114 Posted December 7, 2009 at 06:54 PM Dim d As New DirectoryInfo(FolderBrowserDialog1.SelectedPath) For Each s As FileInfo In d.GetFiles ComboBox1.Items.Add(s.Name) Next Vê se isto te chega... Oracle Certified Professional - AdministraçãoOracle Certified Professional - Pl/sqlMCPD - Microsoft Certified Professional DeveloperMCTS - Microsoft Certified Technology Specialist Link to comment Share on other sites More sharing options...
cagueca Posted December 7, 2009 at 06:59 PM Author Report Share #299115 Posted December 7, 2009 at 06:59 PM sim funcionou bem . obrigado pela ajuda Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now