saving to a file.....HELP

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

how can i save to a file an image i retrieved from the web through werequest
....
pic = new bitmap(stream)

i want to save pic to a jpg file....

and how can i display the content of a folder on a form..... using listview
or can i run the file explorer

this is needed very urgently...thanks for u all..............
 
Not sure how you would save the file as a jpg, I guess you would need an
encoder. To save it as a bitmap just use a filestream. You could then read
it back as a filestream in order to use the same bitmap as you used below.

To add the contents of a directory to a listbox use something like below

DirectoryInfo info = new DirectoryInfo(@"\");
FileInfo[] files = info.GetFiles();

foreach(FileInfo file in files)

{

yourListBox.Items.Add(file.Name);

}
 
Back
Top