我有几个类的第三方组件(我无法修改),现在我需要访问implementation该单元部分中声明的一些类,问题:Is possible get rtti info for types declarated in the implementation part of a external unit?如果不存在可能存在另一种方式来访问这些类型?我知道单位的范围,而且执行声明是私有的,只能在特定单位内使用.但也许存在一些黑客攻击.
我有一个用delphi-xe2编写的应用程序,现在我正在添加VCL样式支持,所以我想构建一个菜单来选择要加载和应用的vcl样式文件,这部分工作正常,菜单是在运行时构建的在具有样式文件的文件夹的内容中.但现在我想显示vcl样式的名称而不是文件名,就像这个图像一样

我如何获得vcl样式文件的样式名称?
我正在构建一个需要始终显示特定表单的应用程序(这是客户请求),到目前为止,我正在使用具有HWND_TOPMOST值的SetWindowPos函数,并且工作正常,但是当Windows 7 Flip 3D功能时被激活我的应用程序不会保持在顶部.
Windows 7翻转3D

问题是,即使Windows 7 Flip 3D被激活,我的表单如何能够保持在所有其他窗口之上?
我正在寻找是否存在一个解析plist osx文件的delphi类,或者我必须像普通的XML文件一样解析这些文件?
我正在尝试从dwscript内部执行此代码(这是一个最小的样本,以便使用CreateOleObject)
function GetFileVersion(const FileName: string): string;
var
V : OleVariant;
begin
V := CreateOleObject('Scripting.FileSystemObject');
Result := V.GetFileVersion(FileName);
end;
Run Code Online (Sandbox Code Playgroud)
到目前为止我试过这个
{$APPTYPE CONSOLE}
{$R *.res}
uses
SysUtils,
ComObj,
ActiveX,
dwsComp,
dwsCompiler,
dwsExprs,
dwsCoreExprs;
procedure Execute;
var
LScript: TDelphiWebScript;
LUnit: TdwsUnit;
LProg: IdwsProgram;
LExec: IdwsProgramExecution;
begin
LScript := TDelphiWebScript.Create(NIL);
LUnit := TdwsUnit.Create(NIL);
try
LUnit.UnitName := 'Foo';
LUnit.Script := LScript;
// compile a simple script
LProg := LScript.Compile(
'function GetFileVersion(const FileName: string): string;'+sLineBreak+
'var'+sLineBreak+
' V : Variant;'+sLineBreak+
'begin'+sLineBreak+
' V := CreateOleObject(''Scripting.FileSystemObject'');'+sLineBreak+
' …Run Code Online (Sandbox Code Playgroud) 我正在使用TImage组件加载一些png图像,但其中一些具有.imp扩展名.我将Vcl.Imaging.pngimage单元添加到我的代码中,我正在使用此代码加载图像
if OpenDialog1.Execute then
Image1.Picture.LoadFromFile(OpenDialog1.FileName);
Run Code Online (Sandbox Code Playgroud)
但是,当执行LoadFromFile过程时,会引发异常
未知的图片文件扩展名(.imp)
这些图像(.imp)是由外部应用程序生成的png文件,位于只读文件夹中,因此重命名这些文件不是一个选项,问题是如何从文件中加载TImage组件中的Png图像还有另一个扩展吗?
我正在使用本文的代码http://melander.dk/articles/alphasplash/在表单中显示32位位图,但是当我尝试使用纯色位图而不是图像时,WM_NCHITTEST消息不是收到了,我不能移动表格.如果我使用32位图图像代码工作正常.我在这里缺少什么?
这是代码
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
protected
{ Private declarations }
procedure WMNCHitTest(var Message: TWMNCHitTest); message WM_NCHITTEST;
public
{ Public declarations }
end;
var
Form1 : TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
BlendFunction: TBlendFunction;
BitmapPos: TPoint;
BitmapSize: TSize;
exStyle: DWORD;
Bitmap: TBitmap;
begin
// Enable window layering
exStyle := GetWindowLongA(Handle, GWL_EXSTYLE);
if (exStyle and WS_EX_LAYERED = 0) then
SetWindowLong(Handle, GWL_EXSTYLE, …Run Code Online (Sandbox Code Playgroud) 我在Delphi XE3中使用TSaveTextFileDialog组件,但是当启用Vcl Style时,编码组合框是使用当前的vcl样式绘制的.

我怎么能解决这个问题,我的意思是禁用组合框的vcl风格?
我正在编写Delphi插件,我需要在模块(视图 - 调试窗口 - 模块)窗口打开时进行检测(连接到IDE编辑器).我正在使用IOTAEditorNotifier在新的编辑器窗口打开时收到通知,但仅适用于源文件.
这是用于从IDE编辑器接收通知的代码.
uses
Classes, SysUtils, ToolsAPI;
type
TSourceEditorNotifier = class(TNotifierObject, IOTANotifier, IOTAEditorNotifier)
private
FEditor: IOTASourceEditor;
FIndex: Integer;
{ IOTANotifier }
procedure Destroyed;
{ IOTAEditorNotifier }
procedure ViewActivated(const View: IOTAEditView);
procedure ViewNotification(const View: IOTAEditView; Operation: TOperation);
public
constructor Create(AEditor: IOTASourceEditor);
destructor Destroy; override;
end;
TIDENotifier = class(TNotifierObject, IOTANotifier, IOTAIDENotifier)
private
{ IOTAIDENotifier }
procedure FileNotification(NotifyCode: TOTAFileNotification; const FileName: string; var Cancel: Boolean);
procedure BeforeCompile(const Project: IOTAProject; var Cancel: Boolean); overload;
procedure AfterCompile(Succeeded: Boolean); overload;
end;
procedure Register; …Run Code Online (Sandbox Code Playgroud) 我正在将用Delphi 2007 .Net编写的应用程序迁移到Delphi Prism,这是替换TStringList和TStrings类的最佳选择吗?
提前致谢.
再见.
delphi ×10
delphi-xe2 ×4
vcl-styles ×2
aero ×1
delphi-prism ×1
delphi-xe ×1
delphi-xe3 ×1
dwm ×1
dwscript ×1
flip3d ×1
macos ×1
oxygene ×1
rtti ×1
timage ×1
toolsapi ×1
tstringlist ×1