Help... how to do ???

FYRe

Freshman
Joined
Aug 10, 2005
Messages
32
Location
Singapore
I have a folder of images to be opened. By using OpenFileDialog (OFD), I managed to open the folder and select a particular image.
I understand that a user can also select the directory to open a file or folder.


After opening the first image in the folder, I would like to have a button "NEXT" on the form, so that when I click the button, the next image in the folder can be viewed.
I also managed to extract the Current Directory of the OFD by using
" CurDir() ".


So my question is:

What codes should I write for the " NEXT " button so that when I click the button, the next image in the folder can be viewed ?
 
Rather than CurDir use Environment.CurrentDirectory. Also if you are using .Net 1.1 it provides a folder browser dialog you could use to get the folder rather than an open file dialog. You could just use System.IO.Directory.GetFiles() to return an array of files in the folder and simply loop through the array when next is clicked.
 
Last edited:
PlausiblyDamp said:
Rather than CurDir use Environment.CurrentDirectory. You could just use System.IO.Directory.GetFiles() to return an array of files in the folder and simply loop through the array when next is clicked.
Could you give me an example of what you've just mentioned ??
thks
 
Back
Top