The 1:st Code, I have put inside a buttoncontrol. This does open a folderBrowserDialog. When I select a folder and press OK. The SelectedPatch is inserted in a textBox1.
What I am trying to do here now is with the 2:nd code to choose a folder and when pressing OK here I want all files that is ".txt" to be inserted into this textBox1.
I know I will have to use FindFirstFile, FindNextFile and FindClose in a way.
I have tried out the first thing to Catch The first .txt file but this doesn´t compile.
Any ideas what it could depend on.
2:ndCode:folderBrowserDialog1.ShowDialog(); this.textBox1.Text = folderBrowserDialog1.SelectedPath;
Code:Handle h; LPWIN32_FIND_DATA lpFileName; h = FindFirstFile(folderBrowserDialog1.SelectedPath, &lpFileName); this.textBox1.Text = h;