2011年11月10日

Using WinInet functions to download a file asynchronously in Delphi

摘要: [转自]http://www.neugls.info/?p=191(注:不好意思,如果你已经应用了该代码的话,请注意,在HttpQueryInfoA函数之前加上一个Reservered:=0;不然,会不能正确的获取到文件的大小。)WinInet functions were used in windows to help developers develop network application more conveniently, but there is no Delphi code example on the internet, so I give some code here, h阅读全文

posted @ 2011-11-10 22:42 潺缘 阅读(219) 评论(0) 编辑

2011年9月27日

使用LiveBinding Delphi XE2

摘要: 【本文转自Blog of NeuglsWorkStudio】为了方便解释如何在程序中使用LiveBinding, 请建立一个控制台程序。首先你需要在Uses子句中添加以下几个单元:Uses System.Bindings.Expression, System.Bindings.Helper;要了解更多的信息,请查看相关的API说明文档:System.Bindings.Expression (该单元里包含了绑定表达式相关的类与方法) System.Bindings.Helper (该单元包含了绑定辅助类的一些方法)第二步下面你需要定义两个你需要绑在一想的绑定对象,例如我们这里定义为TMyOb..阅读全文

posted @ 2011-09-27 21:39 潺缘 阅读(469) 评论(0) 编辑

2011年9月14日

Delphi 对话框实现源码分析

摘要: 简介在这篇文章中,我将大概的从Delphi XE2 的Dialogs单元入手,分析ShowMessage,MessageBox等对话框运行原理,希望能帮助你理解Delphi,不求你爱上她,只求让你能快速地解决问题。跟踪代码为了了解这些对话框的运行原理,我们需要跟踪进源代码中去,为此,你需要做如下设置1. 简单创建一个使用了ShowMessage的VCL应用程序unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls..阅读全文

posted @ 2011-09-14 22:46 潺缘 阅读(1358) 评论(5) 编辑

2011年7月17日

[转]Request Control Introduce

摘要: 本文转自: NeuglsWorkStudio http://www.neugls.info/?p=130 Request control use sqlite3 as its database, connected by sqlitewrap. If you want to know more about sqlitewrap, please visit this website: http://...阅读全文

posted @ 2011-07-17 12:05 潺缘 阅读(53) 评论(0) 编辑

2011年7月16日

Delphi消息分发机制

摘要: Delphi 的消息分发机制 话说Delphi的消息分发机制的实现,有两个关键因素,第一个是TObject,另一个是,个人认为也是最重要的一个是,VMT(virtual method table).我们都知道,一个函数,我们如果要将这个函数定义为可以处理那个特定消息的函数是,都需要加上一个关键字,Message,然后后面加上你要处理的消息ID。而消息分派机制的魔法就在这里。 当我们在函数后面跟上M...阅读全文

posted @ 2011-07-16 19:28 潺缘 阅读(64) 评论(0) 编辑

多线程感悟

摘要: 多线程编程感悟线程是一个执行体一个进程的数据对所有线程都可见数据和线程是分开的,数据不属于任何线程界面由主线程管理主类实例与主线程什么关系实例是进程里的一段内存,这段内存可能含数据和方法实例的方法与主线程或其他线程有什么关系?当主线程调用 了实例的代码,也就是说将实例的代码放到主线程去执行了而已数据与界面的分离:控制界面的代码不直接保管数据主线程就是不断地获取消息,处理消息,而这个处理消息的过程就...阅读全文

posted @ 2011-07-16 19:27 潺缘 阅读(189) 评论(0) 编辑

2011年4月21日

[转]How to set the control word of FPU in delphi

摘要: On systems based on the IA-32 architecture, the FPU control word includes bits that control the FPU's precision, rounding mode, and whether exceptions generate signals if they occur, if you want to k...阅读全文

posted @ 2011-04-21 01:27 潺缘 阅读(148) 评论(0) 编辑

2011年4月15日

Delphi Handle Exception

摘要: 初在Delphi里进行处理错误时,最常用的做法是try….except ….end. 例如:try raise Exception.Create('Error Message'); except on e:Exception do begin ShowMessage(e.Message); end; end;而现在要说的是另外的一种做法:var ExceptionObj : TObject;beg...阅读全文

posted @ 2011-04-15 23:14 潺缘 阅读(400) 评论(0) 编辑

2011年4月6日

JVCL的TJvInspector组件使用方法

摘要: 本文转自:http://www.neugls.info/?p=97JVCLThe JEDI Visual Component Library (JVCL) consists of a large collection (currently ca 500) visual and non-visual components which can be instantly reused in your Delphi, Kylix and C++ Builder projects. You can visit this website to know more about JVCL: http://jv阅读全文

posted @ 2011-04-06 00:42 潺缘 阅读(272) 评论(0) 编辑

2011年4月5日

SuperObject TSuperRttiContext.AsType的问题及解决方法

摘要: 问题是这样的。在我的程序中,我用json存放用户的设置,保存到文件中。当我的程序版本升级时,我往用户的设置中增加了新的Fields。当我从用户的机器中读取老版本的设置时,会出现错误。我的读取与写入代码如下:procedure ReadFromStream<T>(Stream: TStream; var O: T);var CTX:TSuperRttiContext; Size:Cardinal; ...阅读全文

posted @ 2011-04-05 16:43 潺缘 阅读(744) 评论(0) 编辑

仅列出标题  下一页

导航

统计

公告