上一页 1 ··· 169 170 171 172 173 174 175 176 177 ··· 203 下一页
摘要: procedure TForm1.Button1Click(Sender: TObject);varRPrinter:TextFile;i:integer;begin{设置打印机}Assignfile(RPrinter,'lpt1');{准备写文件}Rewrite(RPrinter);{打印}for i := 0 to memo1.lines.Count - 1 doWriteln(RPrinter,memo1.lines[i]);{向后倒纸}Writeln(RPrinter,chr($b)+chr(27)+'K'+chr(40));{向前进纸}Writeln( 阅读全文
posted @ 2010-05-19 07:49 delphi中间件 阅读(365) 评论(0) 推荐(0)
摘要: Last4Str:string; //全局变量function NotRepertStr:string;var n,w,i:integer; s:string;begins:='';if Last4Str='' then Last4Str:='0000';n:=strtoint(Last4Str)+1;if n>9999 then n:=0;w:=Length(inttostr(n)); for i:=1 to 4-w do s:=s+'0';Last4Str:=s+inttostr(n);result:=FormatDat 阅读全文
posted @ 2010-05-19 07:47 delphi中间件 阅读(497) 评论(0) 推荐(0)
摘要: 1、控制POS机的客户显示屏procedure TFrmMain.ShowMoney(Money_Port: String;Money_String:String);//Moneey_Port 顾显接口Com1 or Com2 Money_String 顾显显示的内容var PrnFileName:TextFile;begin Assignfile(PrnFileName,Money_Port); printer.Canvas.Font.Name:='宋体'; printer.Canvas.Font.Size:=8; printer.Canvas.Font.Charset:=G 阅读全文
posted @ 2010-05-19 07:45 delphi中间件 阅读(479) 评论(0) 推荐(0)
摘要: 经常有人提问:说自己的项目是由许多DLL打包方式组织的,各个DLL之间的对象如何共享访问?这其实很简单:只要共享对象创建后,把它的指针保存进一个大家都可以访问 的地方,需要的时候就去取。我说用INI文件暂存共享对象指针也行。为了证明特别写了几行代码:uses inifiles;procedure TForm1.Button2Click(Sender: TObject);var ini: tinifile; h: integer;begin ini := tinifile.Create(extractfilepath(application.ExeName)+'me.ini'); 阅读全文
posted @ 2010-05-18 14:49 delphi中间件 阅读(340) 评论(0) 推荐(0)
摘要: 三方控件,通过使用IMPORT TOOL FOR SCRIPTER生成AP_XXX.PAS文件。在下面的例子中,增加对TPrintDBGridEh的支持。unit myScript;{$DEFINE PRINTDBGRIDEH}{$DEFINE XPMAN}interfaceimplementationuses ap_DB, ap_DBGrids, ap_Controls, ap_Forms, ap_Windows, ap_SysUtils, ap_Messages, ap_Menus, ap_Classes, ap_Variants, ap_Graphics, ap_Dialogs, ap_ 阅读全文
posted @ 2010-05-18 08:17 delphi中间件 阅读(373) 评论(0) 推荐(0)
摘要: 凡是脚本中使用的类,控件,方法,函数都要先行注册以后,脚本才能识别这些对象。本人使用的是scripter studio pro 1.2,发现官方只提供了DELPHI本身所提供的控件的脚本支持文件。那么脚本中需要使用第三方的控件怎么办?幸好TMS提供了方便的专用工具:import tool for Scripter Studio,在TMS的官方网站提供下载。The import tool for Scripter Studio parses Delphi source code files (.Pas) and generate a new .pas import file that regis 阅读全文
posted @ 2010-05-17 20:18 delphi中间件 阅读(546) 评论(0) 推荐(0)
摘要: ========================================================================== 在主从TableView中根据主TableView得到对应的从TableView var ADetailDC: TcxGridDataController; AView: TcxCustomGridTableView; begin with cxGrid1DBTableView1.DataController do ADetailDC := TcxGridDataController(GetDetailDataController(Focused 阅读全文
posted @ 2010-05-17 15:15 delphi中间件 阅读(565) 评论(0) 推荐(0)
摘要: 一、使用TfrxReport 组件工作1、加载并存储报表默认情况下,报表窗体同项目窗体构存储在同一个DFM文件中。多数情况下,无须再操作,因而你就不必采用特殊方法加载报表。如果你决定在文件中存储报表窗体或者是数据库的Blob字段(他提供了非常大的弹性,你能够在非编译程序中修改),你必须使用“TfrxReport”提供的加载和存储方法。function LoadFromFile(const FileName: String; ExceptionIfNotFound: Boolean = False): Boolean;从一个给定名字文件中加载报表。如果第二个参数等于“True”并且文件没找到,那 阅读全文
posted @ 2010-05-17 14:54 delphi中间件 阅读(960) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2010-05-16 16:34 delphi中间件 阅读(348) 评论(0) 推荐(0)
摘要: 试用了几种窗体设计器以后发现还是ECONTROL最好用。 阅读全文
posted @ 2010-05-16 16:25 delphi中间件 阅读(424) 评论(1) 推荐(0)
上一页 1 ··· 169 170 171 172 173 174 175 176 177 ··· 203 下一页