引言: 在使用Delphi开发应用程序时常常要使用到TListView列表视控件,但是仅仅使用TListView的原有属性、方法和事件是不够的,常常需要在程序开发过程中对列表视的功能进行扩展,比如对列表视添加任意列组合排序、ListItem拖动、CustomDraw自绘制、加入背景图等功能,由此可见De...
摘要: 如今realplayer的流式媒体文件以其强大的视频压缩比正逐步悄然兴起。realplayer plus播放器也理所当然地成为大家播放realplayer格式文件的首选软件。不过realplayer plus也不是十全十美的,比如启动时间慢,占用空间大,留有历史记录等等。其实我们可以利用delphi打造一个完全符合自己要求的realplayer播放器。下面我将向大家介绍如何利用delphi来帮......
摘要: 优秀的数据库应用应当充分考虑数据库访问的速度问题。通常可以通过优化数据库、优化 查询语句、分页查询等途径收到明显的效果。即使是这样,也不可避免地会在查询时闪现一个带有 sql符号的沙漏,即鼠标变成了查询等待。最可怜的是用户,他(她)在此时只能无奈地等待。遇到急性子的,干脆在此时尝试 windows中的其它应用程序,结果致使你的数据库应用显示一大片白色的窗口。真是无奈!
本文将以简单的例子告诉......
Delphi中实现让TListView接收文件拖放上一页 ...
windows, messages, sysutils, classes, graphics, controls, forms, dialogs, shellapi,
comctrls; 【程序编程相关:
ADO Command 命令的执行
】 【推荐阅读:
TChart使用经验小结
】
【扩展信息:
ADO 方式下判断数据表是否存在
】
type
tform1 = class(tform)
listview1: tlistview;
procedure formcreate(sender: tobject);
private
{ private declarations }
public
{ public declarations }
procedure appmessage(var msg: tmsg; var handled: boolean);
end;
var
form1: tform1;
implementation
{$r *.dfm}
procedure tform1.formcreate(sender: tobject);
begin
file://设置需要处理文件wm_dropfiles拖放消息
dragacceptfiles(listview1.handle, true);
file://设置appmessage过程来捕获所有消息
application.onmessage := appmessage;
end;
procedure tform1.appmessage(var msg: tmsg; var handled: boolean);
var
nfiles, i: integer;
filename: string;
listitem: tlistitem;
begin
//
// 注意!所有消息都将通过这里!
// 不要在此过程中编写过多的或者需要长时间操作的代码,否则将影响程序的性能
//
// 判断是否是发送到listview1的wm_dropfiles消息 ...
下一页 摘要:我们为了将hint显示在statusbar1上需要如下方法
public
procedure displayhint(sender: tobject);
end;
var
form1: tform1;
implementation
{$r *.dfm}
{ here is the implementation of the onhint event handler }
{......