Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Windows Forms
  4. FolderBorserDialog for images

FolderBorserDialog for images

Scheduled Pinned Locked Moved Windows Forms
c++question
3 Posts 2 Posters 4 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dodoxor
    wrote on last edited by
    #1

    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 .

    G D 2 Replies Last reply
    0
    • D dodoxor

      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 .

      G Offline
      G Offline
      Giorgi Dalakishvili
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      • D dodoxor

        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 .

        D Offline
        D Offline
        dodoxor
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups