PictureBox Update

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • akshah
    New Member
    • Feb 2007
    • 8

    PictureBox Update

    IN C#,

    I want to show an image which is continuously updated in a picture box.

    It's something like this:

    Image img = Image.FromFile( "pic.gif");
    picBox.Image = img;
    ...
    ...
    /*
    I AM GETTING AN ERROR WHILE OPENING THIS FILE
    */
    FileStream fs = new FileStream("pic .gif",FileMode. Create,FileAcce ss.Write)
    ...
    ...
    fs.Close();
    ...
    ...

    I know that the error is bcoz the pic box has the handle to that image.
    I don't get any error if I use two images and use them alternately.

    But, I m looking for a better solution.

    Plz inform me if u have one!

    Happy c#ing.
  • akshah
    New Member
    • Feb 2007
    • 8

    #2
    :-(
    Can anybody help?

    Comment

    • kenobewan
      Recognized Expert Specialist
      • Dec 2006
      • 4871

      #3
      What error are you receiving? Suggest that you place it in a try/ catch block and write the error... Here is an article that may help:
      Image Generation Service for ASP.NET 1.1

      Comment

      • windows_mss
        New Member
        • Jun 2006
        • 13

        #4
        hi akshah,

        put all the image inside one folder and name in sequence number from 1 ...,

        by using for loop u can increment that one ....?

        i hope so i will helps u to go further

        Comment

        Working...