473,385 Members | 1,615 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

PictureBox Update

8
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,FileAccess.Wr ite)
...
...
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.
Feb 13 '07 #1
3 1583
akshah
8
:-(
Can anybody help?
Feb 14 '07 #2
kenobewan
4,871 Expert 4TB
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
Feb 15 '07 #3
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
Feb 15 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Jesse | last post by:
Hi All, I've been working on a form that has several bound controls that all link to one table in a dataset. In the table, there is a column for the filename of jpeg images related to each...
17
by: Jan Nielsen | last post by:
Hi I would like to databind a Picturebox to a SQL Server. I have a typed Dataset "DSBoernekirken1" It has a table named "tpersoner" with a column "Photo" I of course would like to bind the...
2
by: David Ricker | last post by:
I have created a PictureBox control which can have it's Image property directly bound to an image field in a database. This works perfectly for showing the images that are in the database. When I...
10
by: wandii | last post by:
Hi, I have a table which contains a BLOB field for image. I would like to copy a picture from database directly to a picture box control and I have tried the following: Dim c as Integer c =...
7
by: kebalex | last post by:
Hi, I have an app (written in .NET 2.0) which updates a picturebox according to some user input (a slider control). when the user makes a change i loop through all of the pixels, do a...
2
by: Ryan | last post by:
I have a very basic form that has controls bound to a SQL 2005 database for an Employee Directory. I'm using a PictureBox control to bind to the "Photo" field which is of datatype image. However,...
4
by: Jerry West | last post by:
I have a routine that updates a PictureBox image every x seconds. I do this by first loading an array with the path to all of the images. I then generate a random number to use as the index of the...
1
by: bwilde | last post by:
Hello, Here's what I'd like to have in a form that I'm creating: A picture box that contains an image that is significantly larger than the box. I'd like for there to be scroll bars, but also to...
3
by: kirk | last post by:
I have a form with a PictureBox control on it. The .Image property is set to a PNG file(which shows the picture of the US map) with some transparency in it. The .BackColor property is set to...
3
Raventara
by: Raventara | last post by:
Hi all, I have a program which will routinely update the image of a picturebox and resize the picturebox to keep the aspect ratio of the image in tact. The problem I am having is that after about...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.