I am writing a project in windows form application in Visual Studio C++ 2010;
I have an openfileDialog which its MultiSelected Property is true;
I need to access to all the file's name; but every time which I run the program even I select the several files, I just see the first file which is selected in brows window.
my code is here:
if (openFileDialog1->ShowDialog() == System::Windows::Forms::DialogResult::OK)
{
FileCounter = 0;
for each (String^ file in openFileDialog1->FileNames)
{
String ^orig1 = gcnew String(openFileDialog1->FileNames[FileCounter]);
How Can I do that? Thank you So much!
Your code snippet is not complete, try out something like
for each (String^ file in openFileDialog1->FileNames)
{
MessageBox::Show(file);
}