我如何使用delphi从SQL查询中解析和提取参数?
例如:
从这个查询
SELECT * FROM MyTable
WHERE Field1=:Param1
AND Field2=:Param2
AND (Field3=:Param3 OR Field4=:Param4)
Run Code Online (Sandbox Code Playgroud)
我想获得
Param1 Param2 Param3 Param4
提前致谢.
如何以编程方式检查使用delphi或C#安装的WMI版本(Windows Management Instrumentation)?
提前致谢.
我正在尝试实现从中继承的新类List<string>,以将文本文件中的内容加载到项目中.
using System.Collections.Generic;
using System.IO;
using System.Linq;
public class ListExt : List<string>
{
string baseDirectory;
public void LoadFromFile(string FileName)
{
//does not work because _list is private
this._items = File.ReadAllLines(FileName).ToList();
}
}
Run Code Online (Sandbox Code Playgroud)
但我不知道如何将行加载到_items属性中,因为它是私有的.
有什么建议?
我需要过滤一个TClientDataset,实际上我使用这个代码.
if Value<>'' then
begin
ClientDataSet1.DisableControls;
try
ClientDataSet1.Filtered := False;
ClientDataSet1.Filter := 'Value LIKE ' + QuotedStr('%'+Value+'%');
ClientDataSet1.Filtered := True;
finally
ClientDataSet1.EnableControls;
end;
end;
Run Code Online (Sandbox Code Playgroud)
但是过滤器工作在区分大小写的模式下,是否可以过滤记录忽略的情况?
这是检测lazarus IDE是否以编程方式使用delphi安装在系统中的正确方法?
例如,为了检测是否安装了delphi 7,我可以检查此密钥HKLM\Software\Borland\Delphi\7.0.
我在Windows注册表中搜索lazarus的类似密钥,但我没有找到任何东西.
提前致谢.
我有几个颜色列表(TColor)存储在数组中我喜欢使用HUE排序o Luminosity存在任何delphi库或具有这种功能或算法的组件?
我在Delphi IDE(Delphi 2007)的主菜单中添加了一个新条目,并将bmp图像添加到与菜单关联的图像列表中(不将掩码作为参数传递)
IDEMainMenu.Images.Add(Image,nil);
Run Code Online (Sandbox Code Playgroud)
但添加的图像没有显示透明色,我尝试使用8和24位bmp并使用fucsia作为背景颜色,但ide始终显示带背景的图标.所以问题是which is the color depth of the bmp images which i must use and the color of the backgrpund to make appear the image transparent in the delphi ide menu?或者我需要将掩码bmp传递给Images.Add函数?
我正在使用TTabSet带有多个选项卡的组件.现在我想为每个标签分配一个图像,为此我将Images属性的值设置为图像列表,然后标签显示一个图像.问题是如何为TTabSet组件的选项卡设置imageindex?
如何在不显示任何页面的情况下更改TEmbeddedWB组件的defult backgound颜色(clWhite)?

delphi ×9
delphi-xe ×4
c# ×2
.net ×1
collections ×1
delphi-2007 ×1
delphi-7 ×1
lazarus ×1
ota ×1
wmi ×1