摘要:其实把属性编辑器等引用designeditors的部分,如属性编辑器的声明、实现以及属性编辑器的注册另写一个单元就行了。
下面是一个简单的例子
unit nwdicttreeviewreg;
interface
uses
windows, messages, sysutils, classes, graphics, controls, forms, dialogs,
comc......
摘要:将以下代码保存为multinst.pas, 然后在任何project的
main form中uses multinst, 就可以完善防止程序的多个
实例同时运行, 特与大家共享.
unit multinst;
interface
const
mi_querywindowhandle = 1;
mi_respondwindowhandle = 2;
mi_error_none......
反查漢字拼音上一页 ...
金山词霸(2.0-2000版本)内有gb2py.idx与gbk2py.idx,内有国标
gb.gbk的每个汉字的拼音与声调.可用拿来一用. 【程序编程相关:
Delphi组件indy 10中IdTC】 【推荐阅读:
希望我不要下定决心放弃borland与d】
【扩展信息:
Delphi中预编译指令如何使用
】
下面上delphi写的gb2py函数.
function gb2py(hanzi:pchar):pchar;
var
sfile:tmemorystream;
pos,temp,ipos,len:integer;
py:array[0..20] of char;
begin
pos:=($fe-$a1)*(ord(hanzi[0])-$b0)+ord(hanzi[1])-$a1;
sfile:=tmemorystream.create;
sfile.loadfromfile(c:\program files\kingsoft\xdict\gb2py.idx);
//data:=sfile.memory;
sfile.seek($1608+pos*4,sofrombeginning);
sfile.read(ipos,4);
sfile.read(temp,4);
len:=temp-ipos;
sfile.seek(ipos+1,sofrombeginning);
sfile.read(py,len);
py[len-1]:=#0;
sfile.free;
result:=py;
end;
摘要:利用下面的两个函数移动windows的“开始”按钮。
uses
windows;
var
tbhwnd : hwnd;
sbhwnd : hwnd;
{ 移动“开始”按钮到你的表单上}
procedure tform1.button1click(sender: tobject);
begin
tbhwnd := findwindow(shell_traywnd, nil);
sbh......