随笔分类 -  Delphi

摘要:界面设计放入dxUIAdornerManager控件,功能很简单详见主食 procedure TForm1.cxButton1Click(Sender: TObject); var aBadge: TdxBadge; // 声明一个变量用于存储徽章对象 begin // 清除当前所有徽章 dxUIA 阅读全文
posted @ 2024-10-29 16:44 liessay 阅读(62) 评论(0) 推荐(0)
摘要:第一种用XLSReadWriteII51 procedure TForm1.Button1Click(Sender: TObject); var s: string; rows, cols: Integer; sRow, sCol: Integer; begin sRow := 0; //开始行 s 阅读全文
posted @ 2024-10-28 09:57 liessay 阅读(274) 评论(0) 推荐(0)
摘要:创建表 CREATE TABLE [dbo].[Products]( [Code] [nvarchar](20) NOT NULL, [Name] [nvarchar](100) NULL, [Price] [decimal](5, 2) NULL, [Quantity] [int] NULL, [ 阅读全文
posted @ 2024-06-28 19:55 liessay 阅读(137) 评论(0) 推荐(0)
摘要:创建 Menu 表 CREATE TABLE Menu ( MenuID INT PRIMARY KEY, ParentMenuID INT NULL, Title NVARCHAR(100) NOT NULL, URL NVARCHAR(255), OrderNumber INT, IsActiv 阅读全文
posted @ 2024-06-28 17:27 liessay 阅读(149) 评论(0) 推荐(0)
摘要:服务端用的是 mosquitto ,下载地址https://mosquitto.org/download/ 安装完成后需要配置 找到安装目录:mosquitto.conf,打开后修改 allow_anonymous false(禁止匿名登录),password_file D:\Program Fil 阅读全文
posted @ 2024-05-19 00:44 liessay 阅读(1281) 评论(0) 推荐(0)
摘要:空了再写 最终效果 阅读全文
posted @ 2024-03-22 09:22 liessay 阅读(64) 评论(0) 推荐(0)
摘要:界面放上dxGaugeControl控件,点右键添加比例->圆 选择一个自己喜欢的样子,我这只是为了要指针 打开视图选项 AngleStart和AngleEnd主要是调整0-100位置的 MinValue,MaxValue是刻度最大、最小值 MinorTickCount设置次刻度数量 ShowBac 阅读全文
posted @ 2024-03-22 09:18 liessay 阅读(128) 评论(0) 推荐(0)
摘要:官方示例效果 一、图表和数据多标签效果 二、自定义图表和选择图表类型(Border是否显示边线) 三、图表标题(Alignment文字对齐方式,Position标题相对图表的位置,上方、左方、右方、下方) 四、是否透明标注边框,选择透明后没有边框和白色底色 五、鼠标移动上去聚焦选中 六、右侧图例相关 阅读全文
posted @ 2024-03-11 10:35 liessay 阅读(142) 评论(0) 推荐(0)
摘要:bpl unit Unit2; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Form 阅读全文
posted @ 2024-02-28 15:06 liessay 阅读(332) 评论(2) 推荐(0)
摘要:设计数据库结构及内容格式如下 设计界面如下,打开、保存、打印这三列Properties改为CheckBox方式显示 加载菜单代码如下 procedure TForm1.Button1Click(Sender: TObject); var pNode: TcxTreeListNode; // 父节点 阅读全文
posted @ 2024-01-22 21:18 liessay 阅读(213) 评论(0) 推荐(0)
摘要:AnimateFloat 是 Delphi 中用于创建简单动画效果的一个函数,它可以让你平滑地改变控件的属性值,例如位置、大小、透明度等。通过指定起始值和目标值,以及动画持续时间,AnimateFloat 函数可以实现属性值的过渡动画效果。 下面是 AnimateFloat 函数的语法: proce 阅读全文
posted @ 2024-01-17 19:21 liessay 阅读(375) 评论(0) 推荐(0)
摘要:设计界面如下 把ListView的Item的 Appearance为DynamicAppearance,并且把Item改为高度100 添加Item代码 procedure TForm1.Button1Click(Sender: TObject); var img: TListItemImage; t 阅读全文
posted @ 2024-01-16 13:39 liessay 阅读(399) 评论(0) 推荐(0)
摘要:上一篇用设计好界面后用代码添加稍微有些麻烦,所以改为用StyleBook设计好后添加Item 界面上添加ListBox后改Item高度为100 右键添加一条空白记录,观察高度,并且方便自定义编辑style样式 默认添加一条ListBoxItem1Style1的样式,添加Layout布局到这个样式下, 阅读全文
posted @ 2024-01-14 23:22 liessay 阅读(538) 评论(0) 推荐(0)
摘要:界面设计如下 启动时默认值 procedure TForm1.FormCreate(Sender: TObject); begin //启动时隐藏模板 Layout1.Visible := False; //开启隔行变色 ListBox1.AlternatingRowBackground := Tr 阅读全文
posted @ 2024-01-14 21:24 liessay 阅读(369) 评论(0) 推荐(0)
摘要:界面布局设置如下 创建一个过程添加新项目 procedure TForm1.AddItem(name: string; age: Integer); var layout: TLayout; begin // 设置姓名标签的文本 Label3.Text := name; // 设置年龄标签的文本 L 阅读全文
posted @ 2024-01-14 20:09 liessay 阅读(148) 评论(0) 推荐(0)
摘要:正常点击后出现动态创建的控件,会阻止右键菜单,需要以下处理 procedure Tfz_lab_ivf_sjpt.StringGrid1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer 阅读全文
posted @ 2022-06-01 11:05 liessay 阅读(211) 评论(0) 推荐(0)
摘要:一、初始化控件状态 procedure TForm7.FormCreate(Sender: TObject); begin with StringGrid1 do begin ColWidths[0] := 15; Cells[1, 0] := 'Combobox'; ColWidths[1] := 阅读全文
posted @ 2022-05-06 13:29 liessay 阅读(188) 评论(0) 推荐(0)
摘要:效果 比较简单,直接贴代码 //打印第一份报表 procedure TForm1.Button2Click(Sender: TObject); begin frxReport1.LoadFromFile('1.fr3'); TfrxMemoView(frxReport1.FindObject('Me 阅读全文
posted @ 2021-07-08 10:34 liessay 阅读(929) 评论(2) 推荐(0)
摘要:效果展示 调用方式 放入窗体即可使用,不想安装太多组件,可使用纯代码方式调用 interface ..... var AcroPDF: TAcroPDF; .... implementation ..... procedure TForm1.FormClose(Sender: TObject; va 阅读全文
posted @ 2021-07-08 09:32 liessay 阅读(2210) 评论(0) 推荐(0)
摘要:效果 DelphiZXingQRCode下载地址:https://www.debenu.com/open-source/delphizxingqrcode/ 为了调用方便unit DelphiZXIngQRCode增加了一个过程 procedure EncodeToImage(const text: 阅读全文
posted @ 2021-07-08 08:35 liessay 阅读(1942) 评论(0) 推荐(0)