}
#endregion
///
/// 应用程序的主入口点。
///
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void form1_load(object sender, system.eventargs e)
{
b_play.Enabled = false;
b_stop.Enabled = true;
panelPreview.Size = new Size(330,330);
wc = new WebCamera( panelPreview.Handle,panelPreview.Width,panelPreview.Height);
wc.StartWebCam();
}
private void button1_click(object sender, system.eventargs e)
{
b_play.Enabled = false;
b_stop.Enabled = true;
panelPreview.Size = new Size(330,330);
wc = new WebCamera( panelPreview.Handle,panelPreview.Width,panelPreview.Height);
wc.StartWebCam();
}
private void b_stop_click(object sender, system.eventargs e)
{
b_play.Enabled = true;
b_stop.Enabled = false;
wc.CloseWebcam();
}
}
}
from:
http://blog.csdn.net/libiegoupan/archive/2004/09/02/92547.aspx