473,396 Members | 1,996 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,396 software developers and data experts.

How can i display images continuously without my interaction?

Hi

I am developing a small application to capture a record a video file
through webcam in C#.NET.
In this application i created a JPEG images for every slide,means every JPEG
image was treated as a slide then i want to display these images as a slide
show.
How can i alot time teo each frame?
How can i display images one by one without my interaction?
Please give me the solution or any releated source code.
Thanks in advance.

Mamatha
Nov 17 '05 #1
1 3712
Hi,

This might help.

1/ Put a "timer" control on your form (I assume that you're using a form?)
2/ Set the interval (it's in milliseconds)
3/ Set Enabled = true
4/ Handle the 'tick' event. This fires every time the timer passes the
interval. In this tick event, change the picture that you're displaying.

With regards to displaying the picture, I haven't included it in the code
example... I assume that you'd just use a picturebox control.

I have included a code sample which puts a textbox on a form and increments
a counter on it every second.

Hope that this helps,
Damien Sawyer

-----------
using System;

using System.Drawing;

using System.Collections;

using System.ComponentModel;

using System.Windows.Forms;

using System.Data;

namespace csharpTimer

{

/// <summary>

/// Summary description for Form1.

/// </summary>

public class Form1 : System.Windows.Forms.Form

{

private System.Windows.Forms.Timer timer1;

private System.Windows.Forms.Label label1;

private System.ComponentModel.IContainer components;

private short i = 0;

public Form1()

{

//

// Required for Windows Form Designer support

//

InitializeComponent();
}

/// <summary>

/// Clean up any resources being used.

/// </summary>

protected override void Dispose( bool disposing )

{

if( disposing )

{

if (components != null)

{

components.Dispose();

}

}

base.Dispose( disposing );

}

#region Windows Form Designer generated code

/// <summary>

/// Required method for Designer support - do not modify

/// the contents of this method with the code editor.

/// </summary>

private void InitializeComponent()

{

this.components = new System.ComponentModel.Container();

this.timer1 = new System.Windows.Forms.Timer(this.components);

this.label1 = new System.Windows.Forms.Label();

this.SuspendLayout();

//

// timer1

//

this.timer1.Enabled = true;

this.timer1.Interval = 1000;

this.timer1.Tick += new System.EventHandler(this.timer1_Tick);

//

// label1

//

this.label1.Location = new System.Drawing.Point(24, 48);

this.label1.Name = "label1";

this.label1.Size = new System.Drawing.Size(168, 16);

this.label1.TabIndex = 0;

this.label1.Text = "0";

//

// Form1

//

this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);

this.ClientSize = new System.Drawing.Size(292, 266);

this.Controls.Add(this.label1);

this.Name = "Form1";

this.Text = "Form1";

this.ResumeLayout(false);

}

#endregion

/// <summary>

/// The main entry point for the application.

/// </summary>

[STAThread]

static void Main()

{

Application.Run(new Form1());

}

private void timer1_Tick(object sender, System.EventArgs e)

{

i++;

this.label1.Text = i.ToString();

}

}

}
Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: lauren quantrell | last post by:
I am using a timer to display the time it takes a user to complete a file transfer using the code below. The code below will display the total elapsed time, but is there a way to update the time...
2
by: John | last post by:
Hi. When I use VB.NET projects, Visual Studio refreshes the display when I correct errors. (i.e. removes the blue and red lines under syntax errors etc.) But when I use C# projects, the display...
0
by: nandha | last post by:
H I have a doubt in VC++ regarding file reading and displaying in the GUI (Dialog I have a binary file, which contains several piece of information , i have to read the information continuously...
5
by: Yoramo | last post by:
Hello is it possible to display images on a ASPX without having them on the disk of the server ? I have images in a DB and whould like to display them on a web page. writing them to disk...
1
by: karanam ravi kiran via DotNetMonster.com | last post by:
hi friends, i am fresher in the world of .net, i have problem to display time in asp.net web continuously. i want to display time on the form like the "live timer on windows task bar" plz help...
61
by: phil-news-nospam | last post by:
Why does SVG need a different tag than other images? IMHO, SVG should be implemented as an image type just like any other image type, allowing it to work with <img> tags, and ... here is the...
9
by: Suman | last post by:
Happy Friday everyone!!! I am working on a windows service and a C# application and needed some help with certain functionality. Please read through my issue below. Thanks! I have a windows...
4
by: dgiff33 | last post by:
Hello I am trying to display the characters |, /, - and \ one after the other in the same spot, disappearing and being replaced by the next character so that it looks like a spinning prompt. ...
23
by: SaraLeePerson | last post by:
Dear group, I am seeking a easy to maintain and more importantly *working* way to pre-fetch images, so the pages I develop load smoothly without seeing the images kick in flicker as they usually...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.