- 博客(39)
- 资源 (3)
- 收藏
- 关注
原创 使用ScriptControl令程序增加脚本功能
1. 导入Microsoft ScriptControl到ActiveX2. 实现一个自定义的对象IMyObject(Unit2)3. 使用(Unit1),可用使用下面的脚本: MyObject.ShowMsg("MyObject hello"); Count = 1000; AddCount(); ShowMsg("Count=" + Count); IE.Navi
2008-08-20 17:05:00
3846
4
原创 bmp文件格式
一个常用的bmp文件内容由以下结构组成:BITMAPFILEHEADER + BITMAPINFO + 数据typedef struct tagBITMAPFILEHEADER { WORD bfType; DWORD bfSize; WORD bfReserved1; WORD bfReserved2; DWORD bfOffBits; }
2007-09-08 15:28:00
905
原创 学习ie5.5的Element Behaviors笔记
Element Behaviors is HTML component. be written in script using an HTC file, or it can be implemented with a binary by using ATL technoligic.分两种: attached behavio
2007-08-28 12:31:00
808
原创 TActiveForm遇到的焦点问题,导致Key/MouseWheel事件无法接收
procedure TClientX.ActiveFormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);begin ShowMessage(k= +Char(Key)); // SetFocus; end;上面的对话框只是显示一次,分析到原因:因为对话框显示出来后,Focus已经转到IE:Shell D
2007-08-16 18:18:00
1054
原创 ASP中要求IE不要缓冲网页
Response.CacheControl = "no-cache"Call response.addHeader("Cache-Control", "no-cache") %>
2007-07-23 17:56:00
742
原创 一个控制台的调试类
type TDbgConsole = class private m_hConsole:THandle; public constructor Create; destructor Destroy;override; procedure write(const str: string); overload; procedure Write(const Forma
2007-06-29 00:43:00
840
原创 Delphi控制台的Window程序
在写后台的程序时,一般想要dos窗口的输出,可以观察错误信息和实时监控。但又想可以拥有Form的功能。实现方法:program Project2;{$APPTYPE CONSOLE}uses SysUtils, Windows, Forms, Unit1 in Unit1.pas {Form1};begin Application.Initialize;
2007-06-29 00:38:00
1269
原创 捕捉网页的windowClose事件,并调用注销登录页面
New Document function getUrl(url){ var result = null; var request = false; if (window.XMLHttpRequest) { request = new XMLHttpRequest(); } else if (window.ActiveXObject) { request = n
2007-04-12 02:09:00
1722
2
原创 对已经存在的TCP系统进行登录验证
要求:使用Media Service作为VOD server,点播流程: WMP - > WMS由于登录帐号保存在数据库,要实现自己的验证机制,需要在WMS前面加上Socket代理,检查URL中包含的SessionKey,验证流程:WMP -> Proxy -> WMS主要是实现一个代理,利用Delphi本身带的控件IdMappedPortTCP很容易就实现了。unit frm
2007-03-31 23:01:00
1810
原创 MediaPlayer ActiveX访问自定义的URL协议时问题
问题:假如用MediaPlayer要访问类似的 abc://host/xxx 自定义的流媒体时,会出现一个提示,按确定可以正常。如用MediaPlayer ActiveX访问时,则不会出现提示,而且不能播放。解决:安装软件时自动往注册表写:HKEY_CURRENT_USER/Software/Microsoft/MediaPlayer/Player/Schemes/ abcRuntim
2007-03-25 23:58:00
1188
1
原创 HTTP Streaming例子: AsfRecorder.c代码
AsfRecorder.c 研究 v1.1 开源项目, 代码来自: http://sourceforge.net/projects/asfrecorder/主要实现下载http stream file /* The core routine for ASF download/extraction. */ int collectdata(int headeron
2007-02-27 19:56:00
1489
原创 HTTP Streaming protocol 分析笔记
HTTP Streaming protocol 分析笔记 Windows Media service提供mms:// 和http:// 协议进行音视频流播放。由于微软没有公开以上协议的技术细节,很难对流进行下载保存。http相对简单,以下对其进行抓包分析。 mms/http/rstp协议文档可参考http://sdp.ppona.com HTTP交互过程:
2007-02-27 19:38:00
2671
原创 进程间通信方法:接口Variant封装包参数传递
利用接口技术进行进程通信,由于是跨进程,指针是不能传递的,COM提供了Variant类型的参数传递方式 。如:进程P1把数据放在Var中, 调用进程2 P2.SetData(VARIANT Var)进行传送时,系统会进程1的Var数据在进程2的内存空间copy一份一模一样的数据,然后才调用真正的SetData。方便操作Variant的类CVariantBuffer.h
2007-01-27 22:45:00
1660
转载 SafeArray 2 (转帖)
在COM中使用数组参数-SafeArray关键字:DCOM、数组、自定义类型、Marshal、SafeArray、ICollection1 使用SafeArraySafeArray是VB中的数组存储方式。通过SafeArray,可以在VC++和VB间相互调用。SafeArray也是Automation中的标准数组存储方式。1.1 SafeArray处理函数
2007-01-26 23:47:00
1438
转载 SafeArray (转贴)
学会使用SafeArray也是 很重要的,因为在ADO编程中经常要用。它的主要目的是用于automation中的数组型参数的传递。因为在网络环境中,数组是不能直接传递的,而必须 将其包装成SafeArray。实质上SafeArray就是将通常的数组增加一个描述符,说明其维数、长度、边界、元素类型等信息。SafeArray 也并不单独使用,而是将其再包装到VARIANT类型的变量中,然后才作为参
2007-01-26 23:12:00
1055
转载 学会使用SafeArray 选择自 laiyiling 的 Blog
学会使用SafeArray也是 很重要的,因为在ADO编程中经常要用。它的主要目的是用于automation中的数组型参数的传递。因为在网络环境中,数组是不能直接传递的,而必须 将其包装成SafeArray。实质上SafeArray就是将通常的数组增加一个描述符,说明其维数、长度、边界、元素类型等信息。SafeArray 也并不单独使用,而是将其再包装到VARIANT类型的变量中,然后才作为参
2007-01-26 22:55:00
720
转载 GridView 和DataGrid区别
一、GridView和DataGrid的异同GridView 是 DataGrid的后继控件,在.net framework 2 中,虽然还存在DataGrid,但是GridView已经走上了历史的前台,取代DataGrid的趋势已是势不可挡。GridView和 DataGrid功能相似,都是在web页面中显示数据源中的数据,将数据源中的一行数据,也就是一条记录,显示为在web页面上输出表
2007-01-11 22:12:00
8266
原创 asp.net 技巧收集
vs2005常用快捷键 调试快捷键F6: 生成解决方案Ctrl+F6: 生成当前项目F7: 查看代码Shift+F7: 查看窗体设计器F5: 启动调试Ctrl+F5: 开始执行(不调试)Shift+F5: 停止调试Ctrl+Shift+F5: 重启调试F9: 切换断点Ctrl+F9: 启用/停止断点Ctrl+Shift+F9: 删除全部断点F10: 逐过程Ctrl+F10:
2007-01-08 11:07:00
854
原创 delphi关于线程安全问题
TThread提供了几种同步的方法: TThread = class protected procedure Synchronize(Method: TThreadMethod); overload; // 在继承中调用同步 public class procedure Synchronize(AThread: TThread; AMethod: TThreadM
2006-12-13 12:49:00
1998
原创 The first winx project
用VS2005建立的第一个项目,一定要以win32 empty project方式,否则编译会出错手工加IDD_FORMVIEW的dialog resource#include #include "resource.h"class CHello : public winx::ModalDialog{};int WINAPI WinMain(__in HINSTANCE hInstance, __i
2006-12-10 22:15:00
976
原创 关于WTL的CString, CRect, CSize, CPoint
stdafx.h //ATL 7.1 中已有的了:CRect, CSize, CPoint 以及 CString。// 使用時必須用 scope operator 來指明 (i.e. ATL::* 或 WTL::*),不然也可以用 #define _WTL_NO_WTYPES // disable CRect, CSize, CPoint#define _WTL_NO_CSTRIN
2006-08-08 00:57:00
3971
原创 WTL Samples编译错误
1. 在buid debug时会出错有多重的manifest file解决:config project options - conifguration properties - linker - manifesh file - Generate Manifesh = no 2. 在build release时会出错: error LNK2005: __encode_poi
2006-08-05 23:47:00
1098
转载 fill out fields in a TWebBrowser by Drag&Drop?
{ This example shows how to fill out fields in your webbrowser by dragging the content of Label1 to a field of your webbrowser}{ Mit diesem Beispiel kann der Inhalt von Label1 per Drag & Drop in d
2006-02-01 00:09:00
1107
转载 scroll TWebBrowser with own buttons?
// Scroll upprocedure TForm1.Button1Click(Sender: TObject);begin WebBrowser1.OleObject.Document.ParentWindow.ScrollBy(0, -100);end;// Scroll leftprocedure TForm1.Button3Click(Sender: TObject);begin
2006-02-01 00:08:00
1045
转载 post form data with TWebBrowser?
procedure TForm1.Button1Click(Sender: TObject);var i: Integer; EncodedStr: string; Header: OleVariant; Post: OleVariant;begin // Make the post string URL encoded EncodedStr := name=SwissDelphiC
2006-02-01 00:08:00
1085
转载 hide the scrollbars of TWebBrowser?
{Eine Seite muss bereits in TWebBrowser geladen sein}{A page must be loaded into TWebBrowser}procedure TForm1.Button1Click(Sender: TObject);begin WebBrowser1.OleObject.Document.Body.Style.OverflowX
2006-02-01 00:03:00
1039
转载 change the scrollbar colors of TWebBrowser?
A page must be already loaded into TWebBrowser}{Eine Seite muss bereits in TWebBrowser geladen sein}//Example//Beispielprocedure TForm1.Button1Click(Sender: TObject);begin with WebBrowser1 do begin
2006-02-01 00:02:00
967
转载 execute a Javascript function in a Webbrowser/ IE Document?
uses MSHTML_TLB, SHDocVw, ShellAPI;// function to execute a script functionfunction ExecuteScript(doc: IHTMLDocument2; script: string; language: string): Boolean;var win: IHTMLWindow2; Olelanguage:
2006-01-31 23:59:00
1556
转载 ...Invoke Hidden Commands in the TWebBrowser
// The following codes demonstrates an innovative way to invoke hidden// commands to show modal dialogs such as "Add To Favorite" dialog,// "Import/Export Wizard" dialog in your WebBrowser-based appli
2006-01-31 23:13:00
966
转载 ...append HTML Text to a TWebbrowser Document?
http://www.swissdelphicenter.ch/en/showcode.php?id=2148{1. ----------------------------------------------------------------}uses MSHTML;procedure TForm1.Button1Click(Sender: TObject);var Range:
2006-01-31 23:12:00
1131
原创 在VC中添加响应自定义的消息的代码步骤
1. 首先定义一个消息代码#define WM_DEBUG WM_USER + 19992. 在窗口头文件中添加class CStreamServerDlg : public CDialog{ // Generated message map functions //{{AFX_MSG(CStreamServerDlg)... //}}AFX_MSG afx_msg void OnDebu
2005-08-07 21:41:00
1485
原创 Winsock完成端口模型-Delphi代码
原文出处 《Windows网络编程技术》第8章 完成端口模型由于原书附的是C代码,我把其翻译成Delphi代码。 其中winsock2.pas在delphi中不带,要另外下载http://jungla.dit.upm.es/~bti/files/winsock2.pas program CompletionIO;{$APPTYPE CONSOLE}uses Sy
2005-02-05 19:01:00
5274
6
原创 重回Delphi7之路
自从Delphi2005发布的第一天起,就开始试用,把项目移植到Delphi2005,到现在1个半月了。经过考虑还是转回Delphi7,主要有下面几方面考虑:1. Refactoring功能在外界宣传听起来很不错,但在实践中上我很少用到. 况且用MMX已经有此功能2. for..in.. 比for to 方便很多,易理解。但可用可不用。3. 最令人恼火的事是启动特慢,D7用1
2005-01-01 13:58:00
1923
1
原创 delphi 2005 update1 download
Delphi 2005 Update 1 Release Noteshttp://info.borland.com/04/delphi2005/readme_upd1.html Architect (24 Mb)ftp://ftpd.borland.com/download/delphi/Delphi2005_Updates/d2005_ARCH_upd1.exe Enterpri
2004-12-25 02:45:00
1552
1
原创 喜欢的歌曲:张栋梁-《当你孤单你会想起谁》
你的心情总在飞什么事都想去追想抓住一点安慰你总是喜欢在人群中徘徊你最害怕孤单的滋味 你的心那么脆,一碰就会碎经不起一点风吹你的身边总是要许多人陪你最害怕每天的天黑 但是天总会黑,人总要离别谁也不能永远陪谁而孤单的滋味,谁都要面对不只是你我,会感觉到疲惫 当你孤单你会想起谁你想不想找个人来陪你的快乐伤悲,只有我能体会让我再陪
2004-12-21 22:12:00
1506
原创 试用“竞开协同之星”软件
到网站http://www.goto2008.com上申请一个试用版文件大小将近30M,下载速度太慢不到10K,用了好几小时才下载完。安装时,看到几个画面,是安装Media Player之类的包,最后要重新启动,才生效。启动时,提示要联网注册,我申请了一个60天的试用账号登录后主界面是与VS.NET和Outlook首页类似的技术,都用网页加IE external object。
2004-12-20 22:11:00
1717
原创 读书笔记-模式编程
模式编程主要内容是:如何组织类,类关系的编程类关系分两种:1. 继承关系2. 合成关系:分聚合Aggregation、组合Composition,两者区别在于has-a和contains-a,即一个拥有,一个完全包含。合成关系的使用频度比继承高。
2004-12-09 17:01:00
847
原创 Delphi INPUT Helper v1.5 for Delphi 2005
download: http://www.internetoa.com/uploadfiles/KbHelpherV1.5.rarsource: http://www.internetoa.com/uploadfiles/KbHelperV1.5_Src.rar 1. 安装Keyboard Helper for D7/D2005: 1) 把文件fngkhlib.dll复制到 X:
2004-12-09 16:01:00
1393
原创 Delphi INPUT Helper update history
2004-12-08 V1.5移植入Delphi 2005,为使IDE更稳定重新简化了软件 2004-11-5授权中国著名的开源组织cnpack.org移植入CNWizardhttp://bbs.cnvcl.org/viewthread.php?tid=236 2004-10-26* 修正了list out of index bonus(1)的错误 * 修正了AV非
2004-12-09 15:43:00
1524
1
HIDKomponente v1.0.34 for XE5
2014-08-06
Sybase odbc driver 32 setup.exe
2014-07-29
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人