随笔分类 -  Delphi

Delphi相关知识
摘要:DELPHI 调用SAP—RFC 示例 Logon to the R3-system with the componente TSAPLogOnControl In this example the form TForm1 contains the following components: Com 阅读全文
posted @ 2021-12-27 15:57 毛小毛 阅读(272) 评论(0) 推荐(0) 编辑
摘要:VAImpTable.Open; VAImpTable.First; VAImpTable.FetchAll; // Make sure we have ALL the data for the migrate VAImpTable.First; // Just to make sure that 阅读全文
posted @ 2021-06-16 11:45 毛小毛 阅读(64) 评论(0) 推荐(0) 编辑
摘要:1.在sysWoW32目录下找到cmd.exe,右键运行方式选择administrator,输入密码后。2.TrainServer.exe -install 安装服务。 阅读全文
posted @ 2018-04-03 18:46 毛小毛 阅读(289) 评论(0) 推荐(0) 编辑
摘要:urlmon.dll中有一个用于下载的API,MSDN中的定义如下:HRESULT URLDownloadToFile( LPUNKNOWN pCaller, LPCTSTR szURL, LPCTSTR szFileName, DWORD dwReserved, LPBINDSTATUSCALLBACK lpfnCB);Delphi的UrlMon.pas中有它的Pascal声明:function URLDownloadToFile( pCaller: IUnKnown, szURL: PAnsiChar, szFileName: PAnsiChar, dwReserved: DWORD, l 阅读全文
posted @ 2014-03-19 22:24 毛小毛 阅读(1931) 评论(0) 推荐(0) 编辑
摘要:procedureTFrmPrintReport.Button3Click(Sender:TObject);varSchemaDoc,XmlDoc:IXMLDOMDocument2;SchemaCache:IXMLDOMSchemaCollection;Error:IXMLDOMParseError;begin//LoadthedataXmlDoc:=CoDOMDocument40.Create;XmlDoc.async:=False;XmlDoc.load('D:\RONGXING\旅客登记II\ReportAir\2007-11-20\SA_0711200845_ZYK.xml&# 阅读全文
posted @ 2013-12-03 10:20 毛小毛 阅读(537) 评论(0) 推荐(0) 编辑
摘要:siow(1253366)10:11:13两种方法你用的自带的webbrowser还是embeded那个毛小毛(3335076)10:12:15或者有什么办法拦截到是webbrowser,如果有这个错误就直接定位到空白页,免得整个程序崩溃。自带和embeded一样的。我都使用过了,一样的效果。siow(1253366)10:12:41如果是embeded可以设置DisableErrors中的fpExceptions=false毛小毛(3335076)10:12:59哦,我看看siow(1253366)10:13:14如果是自带的,可以在窗体创建的时候加一句Set8087CW($133f);si 阅读全文
posted @ 2013-08-05 11:03 毛小毛 阅读(1282) 评论(0) 推荐(0) 编辑
摘要:很久没有去动Delphi了,突然兴起做个小程序,一个表的ID,在服务器端的应用服务器上生成,如何刷新到客户端?查看了TDataSetProvider的Options属性,比以前增加了一个poPropogateChanges,解释如下:Changes made by the server to updated records as part of the update process are sent back to the client and merged into the client dataset.代码在服务器端TDataSetProvider的BeforeUpdateRecord事件 阅读全文
posted @ 2013-06-20 09:40 毛小毛 阅读(451) 评论(0) 推荐(0) 编辑
摘要:产生问题的根源是Provider会自动获取数据库中的primerkey,到前台ClientDataSet中做验证。 有的时候我们并不需要再前台验证,或者当SQL过于复杂的时候,它并不能正确产生primerkey的验证逻辑。 修改方式有二: 1.这个问题在于datasetprovider (tdata 阅读全文
posted @ 2013-06-05 13:02 毛小毛 阅读(1593) 评论(0) 推荐(0) 编辑
摘要:1.修改OnDraw函数中的FDrawText或DrawText;2 为过程FRunningInDesignMode()中的1个变体变量分配内存空间 VARIANT vtUserMode; //添加下面这句: memset(&vtUserMode,0,sizeof(VARIANT));在VC++中重新编译,注册dsoframer.ocx.3.获取word文档数据流及其与D7变体的数据交换 ovOption:=EmptyParam; ovFormat:='Rich Text Format'; FramerControl1.ExecOleCommand($7001, ovO 阅读全文
posted @ 2013-05-22 14:56 毛小毛 阅读(1940) 评论(1) 推荐(0) 编辑
摘要:adoquery.Parameters.ParamByName('testfieldone').DataType := ftWideString;adoquery.Parameters.ParamByName('testfieldone').value := '中国';把参数的类型DataType改ftWideString即可。这样改后,在调试环境下查看还是乱码,不过已经能正常存储了。 阅读全文
posted @ 2012-10-27 17:38 毛小毛 阅读(457) 评论(0) 推荐(0) 编辑
摘要:好不容易从老外网站上找来的关键答案:In Simple MAPI all you have to do is set MAPIMessage.lpszNoteText to nil and point the first attachment to a fully qualified path to a local HTML file. Outlook, OE, Lotus Notus will set that file as the HTML message body. 阅读全文
posted @ 2012-10-24 22:45 毛小毛 阅读(246) 评论(0) 推荐(0) 编辑
摘要:近期开发一个数据采集程序,出于成本考虑,接收器用Android平板电脑,外接USB条码扫描枪。访问Web程序。奇怪的是:在windows下浏览器中能正确接收到回车字符。而在Android平板上却不能。原因是:需要在条码枪手册,上传数据显示设定-》设定为Return(LF)。 阅读全文
posted @ 2012-06-14 11:25 毛小毛 阅读(2689) 评论(0) 推荐(0) 编辑
摘要:TClientDataSet小家碧玉,恐怕人人都喜欢使用。但是,都知道娶TClientDataSet是有代价的,因为你同时也得面对丈母娘MIDAS.DLL。 能不能使用TClientDataSet又不用MIDAS.DLL呢? 很简单,就是uses一下MidasLib单元! MidasLib单元在Delphi6以及DELPHI的更高版本中才有,是Lib目录下的一个dcu文件。一旦在你的源程序中引用了MidasLib单元,程序运行时就不再需要MIDAS.DLL文件。 然而,编译后程序大小一定会增加200k以上,即使使用包编译模式。 当然,需要的时候才这样做。你的应用程序本身就包含... 阅读全文
posted @ 2011-12-19 17:30 毛小毛 阅读(5751) 评论(1) 推荐(0) 编辑
摘要:uses DateUtils;function StartOfTheYear(const AValue: TDateTime): TDateTime;function EndOfTheYear(const AValue: TDateTime): TDateTime;function StartOfAYear(const AYear: Word): TDateTime;function EndOfAYear(const AYear: Word): TDateTime;function StartOfTheMonth(const AValue: TDateTime): TDateTime;func 阅读全文
posted @ 2011-10-20 13:34 毛小毛 阅读(1822) 评论(0) 推荐(0) 编辑
摘要:一个友好的用户界面,必须具有下拉菜单,弹出菜单,工具条和快捷键。同样一个功能,程序员可能要提供几种操作方式,如文本拷贝,菜单命令&Copy,快捷键Ctrl+C,工具条上的拷贝按钮,都是程序员提供给用户的操作,可以大大方便了不同层次的用户。但是,多增加一种操作方式,就意味着增加响应事件的代码,还有,实现统一功能的多个操作必须一致,如剪切板上不为空的时候,菜单命令,快捷键,按钮,都是可以选择的Enabled状态,而剪切板上没有内容时,这些构件的Enabled状态都为假。当然,如果不集中控制这些细节的话,实现相同功能的构件要一致,必须多增加代码,控制较为复杂。Action就是将实现某个功能的 阅读全文
posted @ 2011-10-12 16:43 毛小毛 阅读(10847) 评论(0) 推荐(2) 编辑
摘要:classprocedureTVTUpgrader.UpdateSelf(constFileName:TVTString);varLBatchFile:TextFile;LBatchFileName:TVTString;LProcessInfo:TProcessInformation;LStartUpInfo:TStartupInfo;begin//批处理文件名LBatchFileName:=ExtractFilePath(ParamStr(0))+'_deleteme.bat';//打开文件,设置覆盖模式AssignFile(LBatchFile,LBatchFileName 阅读全文
posted @ 2011-10-11 15:37 毛小毛 阅读(565) 评论(0) 推荐(0) 编辑
摘要:原文标题:How to use transparent PNG icons with Delphi ImageList 原文:http://www.aha-soft.com/faq/delphi-imagelist-png.htmQuery: "Embarcadero Delphi ImageList does not show transparent PNG icons correctly. How to fix it?".Solution: If you want to use 32-bit (24-bit + alpha channel) PNG icons with 阅读全文
posted @ 2011-09-28 10:23 毛小毛 阅读(4509) 评论(0) 推荐(0) 编辑
摘要:安装RemObjects后打开Dephi报No RemObject server templates were found under \Templates\错误解决方法: 点击开始-运行,输入regedit.exe打开注册表,在HKEY_CURRENT_USER\Software下新建一个项,名为 RemObjects,在RemObjects下面再新建一个项,名为RemObjects SDK for Delphi,最后在RemObjects SDK for Delphi下面新建一个字符串值,名为InstallDir,值为D:\RemObjects\RemObjects SDK for Del 阅读全文
posted @ 2011-09-14 18:09 毛小毛 阅读(671) 评论(0) 推荐(0) 编辑
摘要:在工程文件头加入 Windows引用在begin后加入SetThreadLocale( DWORD(Word(SORT_DEFAULT) shl 16) or DWORD(Word(SUBLANG_CHINESE_SIMPLIFIED) shl 10) or DWORD(Word(LANG_CHINESE)) );原理:设置程序的所在区域方法来自互联网,备忘~ 阅读全文
posted @ 2011-01-15 21:32 毛小毛 阅读(679) 评论(0) 推荐(1) 编辑
摘要:首先在下载的文件里你会找到一个文件,位置在Replacement BorlndMM DLL\Precompiled\for Delphi IDE\Performance\BorlndMM.dll,替换掉Delphi\Bin下的相应文件就可以完成对IDE的提速。 对自己编的程序的提速也非常简单,只要在.dpr工程文件里的uses部分加上FastMM4就可以了,但必须是加在第一位,还要记得设置 路径。重新编译你的程序就可以完成提速。一般情况下,感觉程序的启动速度会有提高。如果你的程序有内存泄漏的话那就会在程序关闭时弹出一个对话框告诉你你 的程序有内存泄漏,并指出相应的有内存泄漏的类。例如,我的程序 阅读全文
posted @ 2010-12-30 13:26 毛小毛 阅读(5570) 评论(0) 推荐(1) 编辑

点击右上角即可分享
微信分享提示