资源简介
采集卡的C#Demo,不好找啊。。。
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace WindowsApplication1
{
public delegate bool BeginCapture(Int32 hBoard);
public delegate void Display(Int32 hBoard Int32 no);
public delegate bool EndCapture(Int32 hBoard);
public partial class JHIImageBoardDemo : Form
{
okapi32 okApi;
private Int32 IsSaveSeq;//1-beg2-con3-end
private bool IsSaveImg = false;
private bool IsConvertRect = true;
private bool IsCapturing = false;
public long TotalNo = 0;
public static bool bSaveSeq = false;
private Bitmap _bufferImage;
public static Int32 width = 0;
public static Int32 height = 0;
public static Int32 Stride = 0;
public static Int32 PixelFormat = 0;
public static Rectangle rect = new Rectangle();
public static PictureBox mShowBox;
private int SC_MINIMIZE = 0xF020;//define for min windows size
static BeginCapture BeginCap;
static Display DispCap;
static EndCapture EndCap;
protected override void WndProc(ref Message m)
{
if (m.WParam.ToInt32() == SC_MINIMIZE) // minimize message
{
IsConvertRect = false;
//m.Result = new IntPtr(0); // Take care of message
//this.Hide(); // Hide the form
}
else // Else...
{
IsConvertRect = true;
}
base.WndProc(ref m);// ...let Form take care of this message (normally)
}
public JHIImageBoardDemo()
{
Control.CheckForIllegalCrossThreadCalls = false;
TotalNo = 0;
InitializeComponent();
okApi = new okapi32();
mShowBox = this.ShowBox;
}
unsafe private void btnBeginCapt_Click(object sender EventArgs e)
{
string MsgBox;
Int32 Ret = 0;
string filename = “c:\\1.avi“;//要保存文件的文件名,.net 使用unicode编码
char[] szFilenameW = filename.ToCharArray();//“unicode“
//把unicode 转为ascii编码
byte[] szFilename = Encoding.GetEncoding(“ASCII“).GetBytes(szFilenameW);
BeginCap = new BeginCapture(JHIImageBoardDemo.BCapture);
DispCap = new Display(JHIImageBoardDemo.DCapture);
EndCap = new EndCapture(JHIImageBoardDemo.ECapture);
Int32 OutputFreq = 0;
bSaveSeq = chkSaveSeq.Checked;
if( okApi.hBoard<=0)
{
//if not exist display show msg on ShowBox
MsgBox = “采集卡错误“;
LabelMsgBox.Text = MsgBox;
return;
}
else{}//do ne
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2015-03-06 09:53 SimpleDisplayCapture(vs2010 x32\SimpleDisplayCapture\
目录 0 2015-03-06 09:53 SimpleDisplayCapture(vs2010 x32\SimpleDisplayCapture\_UpgradeReport_Files\
文件 3348 2014-05-15 16:43 SimpleDisplayCapture(vs2010 x32\SimpleDisplayCapture\_UpgradeReport_Files\UpgradeReport.css
文件 12505 2010-05-04 08:19 SimpleDisplayCapture(vs2010 x32\SimpleDisplayCapture\_UpgradeReport_Files\UpgradeReport.xslt
文件 69 2014-05-15 16:43 SimpleDisplayCapture(vs2010 x32\SimpleDisplayCapture\_UpgradeReport_Files\UpgradeReport_Minus.gif
文件 71 2014-05-15 16:43 SimpleDisplayCapture(vs2010 x32\SimpleDisplayCapture\_UpgradeReport_Files\UpgradeReport_Plus.gif
文件 1657 2015-07-17 14:09 SimpleDisplayCapture(vs2010 x32\SimpleDisplayCapture\SimpleDisplayCapture.sln
文件 47616 2015-07-17 16:07 SimpleDisplayCapture(vs2010 x32\SimpleDisplayCapture\SimpleDisplayCapture.suo
文件 5873 2014-05-15 16:43 SimpleDisplayCapture(vs2010 x32\SimpleDisplayCapture\UpgradeLog.xm
目录 0 2015-07-17 13:50 SimpleDisplayCapture(vs2010 x32\SimpleDisplayCapture\WindowsApplication1\
文件 144 2014-05-16 15:43 SimpleDisplayCapture(vs2010 x32\SimpleDisplayCapture\WindowsApplication1\app.config
目录 0 2015-07-17 14:09 SimpleDisplayCapture(vs2010 x32\SimpleDisplayCapture\WindowsApplication1\bin\
目录 0 2015-03-06 10:12 SimpleDisplayCapture(vs2010 x32\SimpleDisplayCapture\WindowsApplication1\bin\Debug\
文件 40960 2015-03-06 10:12 SimpleDisplayCapture(vs2010 x32\SimpleDisplayCapture\WindowsApplication1\bin\Debug\WindowsApplication1.exe
文件 144 2014-05-16 15:43 SimpleDisplayCapture(vs2010 x32\SimpleDisplayCapture\WindowsApplication1\bin\Debug\WindowsApplication1.exe.config
文件 48640 2015-03-06 10:12 SimpleDisplayCapture(vs2010 x32\SimpleDisplayCapture\WindowsApplication1\bin\Debug\WindowsApplication1.pdb
文件 5632 2005-12-08 14:51 SimpleDisplayCapture(vs2010 x32\SimpleDisplayCapture\WindowsApplication1\bin\Debug\WindowsApplication1.vshost.exe
文件 144 2014-05-16 15:43 SimpleDisplayCapture(vs2010 x32\SimpleDisplayCapture\WindowsApplication1\bin\Debug\WindowsApplication1.vshost.exe.config
目录 0 2015-07-17 14:06 SimpleDisplayCapture(vs2010 x32\SimpleDisplayCapture\WindowsApplication1\bin\Release\
文件 122 2015-03-06 10:09 SimpleDisplayCapture(vs2010 x32\SimpleDisplayCapture\WindowsApplication1\bin\Release\check_usb30.txt
文件 460800 2014-10-28 09:41 SimpleDisplayCapture(vs2010 x32\SimpleDisplayCapture\WindowsApplication1\bin\Release\OKAPI32.dll
文件 28672 2015-07-17 14:06 SimpleDisplayCapture(vs2010 x32\SimpleDisplayCapture\WindowsApplication1\bin\Release\WindowsApplication1.exe
文件 144 2014-05-16 15:43 SimpleDisplayCapture(vs2010 x32\SimpleDisplayCapture\WindowsApplication1\bin\Release\WindowsApplication1.exe.config
文件 36352 2015-07-17 14:06 SimpleDisplayCapture(vs2010 x32\SimpleDisplayCapture\WindowsApplication1\bin\Release\WindowsApplication1.pdb
文件 11592 2015-07-17 14:08 SimpleDisplayCapture(vs2010 x32\SimpleDisplayCapture\WindowsApplication1\bin\Release\WindowsApplication1.vshost.exe
文件 144 2014-05-16 15:43 SimpleDisplayCapture(vs2010 x32\SimpleDisplayCapture\WindowsApplication1\bin\Release\WindowsApplication1.vshost.exe.config
文件 490 2013-06-18 20:28 SimpleDisplayCapture(vs2010 x32\SimpleDisplayCapture\WindowsApplication1\bin\Release\WindowsApplication1.vshost.exe.manifest
目录 0 2015-03-06 09:53 SimpleDisplayCapture(vs2010 x32\SimpleDisplayCapture\WindowsApplication1\bin\x64\
目录 0 2015-03-06 09:53 SimpleDisplayCapture(vs2010 x32\SimpleDisplayCapture\WindowsApplication1\bin\x64\Debug\
文件 28160 2014-06-10 09:23 SimpleDisplayCapture(vs2010 x32\SimpleDisplayCapture\WindowsApplication1\bin\x64\Debug\WindowsApplication1.exe
文件 144 2014-05-16 15:43 SimpleDisplayCapture(vs2010 x32\SimpleDisplayCapture\WindowsApplication1\bin\x64\Debug\WindowsApplication1.exe.config
............此处省略95个文件信息
- 上一篇:脚踏开关在C#程序中作输入信号
- 下一篇:Wpf datagrid 增删改查
相关资源
- 脚踏开关在C#程序中作输入信号
- C#多线程进度条
- 四叉树索引c#gis原理时做的作业,感觉
- 利用c#语言计算卫星的位置代码
- C#实现的计算机图形学基本绘图算法
- c#定时器+多线程
- C#将txt文档中的重复记录删除。
- C#+串口和USB通信编程(代码)
- 基于C#的窗体弹球小程序
- .net关于PI读取实时、极值、历史数据
- C# 利用remoting制作局域网简单聊天室
- 上位机与PLC通讯软件C#
- C# EXCEL ExcelHelper
- 18.C# (事件触发)回调函数,完美处
- C#用户权限角色管理
- 仿QQ面板的WinForm窗体源代码
- C#利用事件委托实现窗体的传值做的计
- c#用户权限管理实现
- C#面向对象编程的小案例--编程之模拟
- C# 网络爬虫程序源码 C#网络舆论监控
- C#滚动字幕 如酷狗桌面透明屏幕字幕
- C# 数据采集 盗取订单
- C# 多边形拓扑结构生成算法
- TestAutoTextBox.rar
- c# 判断文件是否存在
- C# 文件传输 UDP
- C#开发界面设计规范
- C#中通用TCP/IP客户/服务器通信库源代
- c#图像处理bmp转化为灰度图片
- C# 贪吃蛇demo最简单的代码
评论
共有 条评论