FolderBorserDialog for images
-
Hi to everyone.In my visual c++ window form appplication, i want to open a directory (of images) and see the images in a picturebox. I know that i can use folderborwserdialog to select the directory but when i've the path selected in the folderbrowserdialog how can i use the files in it? Have i to pass something to an imagelist?? Thanks for answers, bye .
-
Hi to everyone.In my visual c++ window form appplication, i want to open a directory (of images) and see the images in a picturebox. I know that i can use folderborwserdialog to select the directory but when i've the path selected in the folderbrowserdialog how can i use the files in it? Have i to pass something to an imagelist?? Thanks for answers, bye .
Where do you want to show those images? If you have another form for images then you can retrieve all the images from the folder path you got using folderbrowsedialog
#region signature my articles #endregion
-
Hi to everyone.In my visual c++ window form appplication, i want to open a directory (of images) and see the images in a picturebox. I know that i can use folderborwserdialog to select the directory but when i've the path selected in the folderbrowserdialog how can i use the files in it? Have i to pass something to an imagelist?? Thanks for answers, bye .
I've a solution...(take the directory name and gets the files in it). String^ folderName; array ^ files; System::Windows::Forms::DialogResult result = folderBrowserDialog1->ShowDialog(); if ( result == ::DialogResult::OK ) { folderName = folderBrowserDialog1->SelectedPath; } files=System::IO::Directory::GetFiles(folderName); if(files->Length!=0) for(int i=0;iLength;i++) { FileInfo^ fi = gcnew FileInfo(files[i]); if(fi->Extension==".jpeg" || fi->Extension==".bmp"||fi->Extension==".jpg") { Bitmap^ cap=gcnew Bitmap(fi->FullName); this->capture_img_box->Image=cap; System::Threading::Thread::Sleep(1000); this->Refresh(); Application::DoEvents(); } } Thanks however for the answers. Bye.