易截截图软件、单文件、免安装、纯绿色、仅160KB

怎样用DELPHI接收摄像头的图象

community.csdn.net/Expert/topic/3423/3423580.xml?temp=.7675897
主  题:  怎样用DELPHI接收摄像头的图象 
作  者:  benbenpear (笨笨) 
等  级:   
信 誉 值:  100 
所属社区:  Delphi GAME,图形处理/多媒体 
问题点数:  0 
回复次数:  9 
发表时间:  2004-10-2 1:04:08 
 
代码:
const WM_CAP_START = WM_USER;
const WM_CAP_STOP = WM_CAP_START + 68;
const WM_CAP_DRIVER_CONNECT = WM_CAP_START + 10;
const WM_CAP_DRIVER_DISCONNECT = WM_CAP_START + 11;
const WM_CAP_SAVEDIB = WM_CAP_START + 25;
const WM_CAP_GRAB_FRAME = WM_CAP_START + 60;
const WM_CAP_SEQUENCE = WM_CAP_START + 62;
const WM_CAP_FILE_SET_CAPTURE_FILEA = WM_CAP_START + 20;
const WM_CAP_SEQUENCE_NOFILE =WM_CAP_START+  63
const WM_CAP_SET_OVERLAY =WM_CAP_START+  51
const WM_CAP_SET_PREVIEW =WM_CAP_START+  50
const WM_CAP_SET_CALLBACK_VIDEOSTREAM = WM_CAP_START +6;
const WM_CAP_SET_CALLBACK_ERROR=WM_CAP_START +2;
const WM_CAP_SET_CALLBACK_STATUSA= WM_CAP_START +3;
const WM_CAP_SET_CALLBACK_FRAME= WM_CAP_START +5;
const WM_CAP_SET_SCALE=WM_CAP_START+  53
const WM_CAP_SET_PREVIEWRATE=WM_CAP_START+  52
function capCreateCaptureWindowA(lpszWindowName : PCHAR; dwStyle : longint; x : integer;
   y : integer;nWidth : integer;nHeight : integer;ParentWin : HWND;
   nId : integer): HWND;STDCALL EXTERNAL 'AVICAP32.DLL';
上面的代码就是我们主要用到的一个函数和常量的定义。
好了,打开你的Delphi,新建一个工程,将上面的定义加上吧。
新建一个窗口,放个Panel上去,添加一个按钮,Caption设置为"开始"
这里需要定义一个全局变量,var  hWndC : THandle;
开始按钮代码如下:
begin
 hWndC := capCreateCaptureWindowA('My Own Capture Window',WS_CHILD or WS_VISIBLE ,Panel1.Left,Panel1.Top,Panel1.Width,Panel1.Height,Form1.Handle,0);
 hWndC := capCreateCaptureWindowA('My Own Capture Window',WS_CHILD or WS_VISIBLE ,Panel1.Left,Panel1


相关文档:

delphi中用ado连接oracle 10g

2009-12-01  00:41:35
之前安装了oracle 10g,后来为了在C#里面连接oracle,安装了ODAC,之后连接数据库时,填写数据库服务名,总是会出错,连接测试无法通过,不填数据库服务名,倒还可以通过连接测试
今晚终于查到原因了。。。
系统属性那里的环境变量,path这里,oracle的两个默认路径:
d:\oracle\product\10. ......

Delphi关联文件扩展名

unit unitMain;
interface
uses
Registry, shlobj,
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls;
type
TExtForm = class(TForm)
ledExtension: TLabeledEdit;
ledAssocApp: TLabeledEdit;
GetAssocApp: TButton;
AssocTh ......

Delphi 的RTTI机制浅探(续)

http://www.delphibbs.com/delphibbs/dispq.asp?LID=2421470
本文是《Delphi 的RTTI机制浅探》的续篇,上篇地址在:
  http://www.delphibbs.com/delphibbs/dispq.asp?lid=2420610
本文上篇基本上是
RTTI 入门介绍,续篇介绍了所有 TypInfo.pas 中的函数,附加了 Classes.pas、Graphics.pas、Controls.pas
中的 ......

Delphi基础开发技巧(1)

http://developer.51cto.com/art/200510/7205.htm
[DELPHI]网络邻居复制文件
uses shellapi;
copyfile(pchar('newfile.txt'),pchar('//computername/direction/targer.txt'),false);
[DELPHI]产生鼠标拖动效果
通过MouseMove事件、DragOver事件、EndDrag事件实现,例如在PANEL上的LABEL:
var xpanel,ypanel,xlabel,yla ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号