Delphi

Delphi

DELPHI FIREDAC压缩和修复MS ACCESS数据库

36 0

现在,Delphi Firedac只需几行代码就可以更干净地执行这些功能。在数据模块中,您需要删除FDMSAccessService组件并将驱动程序链接设置为FDPhysMSAccessDriverLink 数据库连接应该关闭。应该设置数据库名称和路径。仅在使用数据库密码时才需要设置数据库密码。执行修复和压缩以完成任务。 function TfrmMainForm.CompactAndRepair(const DB: string): Boolean;begin Result := True;

Delphi

Delph记录输出日志

31 0

Delphi程序在运行着,有时想获取一些程序运行的值的话,可以用下面的输出日志的函数来实现procedure WriteLog(sContent: string); //写入日志vartFile: TextFile;filename: string;logDir:string;beginlogDir:='log';filename := ExtractFilePath(Application.ExeName) + logDir+'\'+ FormatDateTime(&#

Delphi

Delphi 通用压缩单元

79 0

/// <author>cxg 2020-7-7</author>/// 支持跨os,支持d7及以上版本unit zip; interface {$if CompilerVersion>= 21} //d2010 {$define NEWZLib}{$IFEND} uses Classes, Zlib, SysUtils; type{$if CompilerVersion< 18.5} //d2007 TBytes = array of Byte;{$IFE

Delphi

Delphi 日期相关总结20190702完结篇

97 0

unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,DateUtils, ComCtrls;type TForm1 = class(TForm) Button1: TButton; Memo1: TMemo; Button2: TButton; DateTimePicker1: TDateTi

Delphi

Delphi fmx 获取控件句柄

200 0

Delphi fmx 获取控件句柄Fmx 框架控件如果 从 TPresentedControl 类继承下来的,会有一个属性,ControlType,它是一个枚举。打开 FMX.Controls 单元定义:TControlType = (Styled, Platform); 控件的ControlType属性默认为 Styled,如果使用 Platform ,则使用当前平台原生创建。在 Win 平台原生创建是有句柄的。我通过遍历里面的对象,获取到它的 TWinNativeScene 类,取出句柄。原码如

Delphi

Delphi TFDQuery提交TFDMemTable修改的数据

134 0

TFDQuery提交TFDMemTable修改的数据function Save(const tableName: string; delta: TStream; qry: TFDQuery): Boolean;begin qry.Close; qry.CachedUpdates := True; qry.sql.Clear; qry.sql.Text := 'select * from ' + tableName + ' where 1=2'; qry.Load

Delphi

Delphi 微信公众平台 Delphi SDK

101 0

微信公众平台 Delphi SDK使用方法used WX.App, WX.Common;varApp: IwxApp;begin App := TwxAppBuilder.New.AppId('编号').Secret('密码').Build; App.GetMenuInfo; App.GetUserList; App.DownloadMedia; //... // ...end;下载页面:https://github.com/liuyashao/DelphiW