Delphi Xe,Win7x64
如何检测不完整的Windows版本N或K(Win XpSp3-Win7x64)?没有IE,Wmp.
例:
Function isWinKNedition:bool;
begin
result:=?????
end;
...
procedure TForm1.FormCreate(Sender: TObject);
begin
if isWinKNedition then begin showmessage('This program can work only on full versions OS Windows');Halt;end;
end;
Run Code Online (Sandbox Code Playgroud) 在Win7 x64上使用Delphi XE,有Jedi类库ver.3.45和7z.dll ver.9.20,
Uses .., jclcompression;
procedure TForm1.Button1Click(Sender: TObject);
const
an = 'C:\1.7z';
fn = 'C:\1.txt';
var Arc: TJclCompressArchive;
Ext: TJclCompressArchiveClass;
begin
Ext := GetArchiveFormats.FindCompressFormat(an);
Arc := Ext.Create(an);
Arc.AddFile(ExtractFileName(fn), fn);
Arc.Password:='123';
// arc. .. compresslevel:= 0..9 (or store..ultra)
// arc. .. compressmethod:= (lzma,lzma,bzip2,ppmd)
// arc. .. dictionarysize:= (1 shl 1..30)
// arc. .. comressheader:= true-false
// arc. .. cryptalgorithm:= ??? aes256 only?
// arc. .. threads:= 1..2
// arc. .. cryptheader:= true-false
Arc.Compress;
end;
Run Code Online (Sandbox Code Playgroud)
如何选择上面显示的压缩选项作为带"//"的注释?
绝地文件实际上是零,可能有人遇到这样的问题?
用7z尝试了一些不同版本的"作业":tSevenZip,SevenZipVcl,SevenZip Api,但已经得出结论,在项目Jedi中使用7z.dll工作的最新版本.
德尔福.
为什么
type
myInt = Integer;
myNewInt = -2147483648..2147483647;
var
a: myint;
b: myNewInt;
begin
a := b;
end;
Run Code Online (Sandbox Code Playgroud)
它是正常编译的,虽然类型正式不同 - 一个在这里声明,另一个从其他模块承担.而如果
uses
windows;
type
_FILETIMEA = record // Copy from windows.pas
dwLowDateTime: DWORD;
dwHighDateTime: DWORD;
end;
var
x: _FILETIMEA;
y: windows._FILETIME;
begin
x := y;
end;
Run Code Online (Sandbox Code Playgroud)
但是会导致编译错误(在线x:=y; [DCC Error] ... E2010 Incompatible types: 'windows._FILETIME' and '_FILETIMEA')type _FILETIMEA = Windows._FILETIME吗?
如何将自己的项目添加到Delphi选项对话框(工具\选项)?例如,请参阅Project JEDI选项.

例如,对我来说,有一个我的书签,包括我的组件和新项目的编译选项.例如,有一个新的项目,在它的面板和3上面的复选框如何添加?
德尔福Xe4.表单,ActionManager,ImageList(带有32x32图标),ActionMainMenuBar.
我无法确保图标显示正确.你该怎么办?

同时,如果我应用任何vcl风格的装饰,它显示正常.但是,如果默认情况下为"Windows"样式,则文本会移出图标.救命.



对不起英语不好.
德尔福.如何从DLL学习处理导致此DLL的附录?
这是必要的:知道Handle附录,我希望Dll在创建对话时使用这个句柄,因为创建为TOpendialog.Create(nil)的对话有时会出现在基本表单的主窗口下.所以,在DLL中我会:
application.handle:=GetExeHandle; // GetExeHandle - How to learn?
Opendialog1:=TOpendialog.Create(application);
...
Run Code Online (Sandbox Code Playgroud)
这是对的吗?
Win7x64,DelphiXe.编写了程序,该程序注册了控制面板小程序(如下所示:http://msdn.microsoft.com/en-us/library/bb757044.aspx).一切都完美无缺,小程序通常会被注册,显示和启动.
但是在删除登记的登记册的钥匙时:
HKEY_LOCAL_MACHINE\SOFTWARE \微软\的Windows\CurrentVersion\Explorer中\ ControlPanel控制面板\命名空间\ {0052D9FC-6764-4D29-A66F-2F3BD9E2BB40}
没有发生:
创建:
...
var reg1:tregistry;key:string;
begin
key:='SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel\NameSpace\ {0052D9FC-6764-4D29-A66F-2F3BD9E2BB40}';
reg1:=tregistry.Create;
reg1.RootKey:=HKEY_LOCAL_MACHINE;
reg1.Access: = KEY_WOW64_64KEY + KEY_ALL_ACCESS;
if reg1.Openkey(key,true)=true then showmessage('ok');
reg1.Closekey;
reg1.free;
end;
Run Code Online (Sandbox Code Playgroud)
删除:
procedure TForm1.Button1Click (Sender: TObject);
var reg1:tregistry; key:string;
begin
reg1: = tregistry.Create;
reg1.RootKey: = HKEY_LOCAL_MACHINE;
reg1.Access: = KEY_WOW64_64KEY + KEY_ALL_ACCESS;
key: ='SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel\NameSpace\{0052D9FC-6764-4D29-A66F-2F3BD9E2BB40}';
if reg1.KeyExists (Key)=true then Showmesage ('Key exists'); // work
if reg1.DeleteKey (Key)=true then Showmesage ('Ok'); // ! not work !
Showmesage (inttostr(getlasterror)); // show "0"
reg1.Free; …Run Code Online (Sandbox Code Playgroud) Delphi Xe,Win7x64
如何从进程名称(exe文件的完整路径)获取主窗口句柄,或至少一个类或窗口名称(如果该进程只有一个窗口).
例:
function MyGetWinHandle(path:String):HWND;
...
handle := MyGetWinHandle('c:\windows\system32\notepad.exe');
Run Code Online (Sandbox Code Playgroud) 让我们承认,我在Delphi Xe2中创建了新的包.我保持名称"我的".我添加了一个简单的组件"MyComponent".我编译,我在C:\ Users\Public\Documents\RAD Studio\9.0\Bpl\My.bpl中收到文件Bpl.
我添加了一个"Win x64"平台.我编译,我收到C:\ Users\Public\Documents\RAD Studio\9.0\Bpl\Win64\My.bpl.
...\Bpl\Win64\My.bpl建立新包不给,写"不是windows x32应用程序".第一个是正常建立的,在调色板上组件显示为"MyComponent".如果要使静音,鼠标的索引将显示提示将写入的位置,即x32兼容.而在原生组件Delphi - 兼容所有x32-64.与磁盘到Xe2一起有一个带有Free和Tral组件的空闲磁盘,如果从中放置例如OverByteIcs或Ip*Works,那么它们在所有组件上的兼容性将是32-64х.
问题:1.如何建立x64版本包?2.如何实现,该组件具有兼容性32-64,而不仅仅是32?
PS坏英语:ON
我运行Win7和希望改变设置时显示的构建标识符HKCU\Control Panel\Desktop\PaintDesktopVersion来1.
是否有可能更改此文本或添加到该文本(例如个人计算机的名称或用户的名称)?
delphi ×10
delphi-xe2 ×3
winapi ×2
7zip ×1
action-menu ×1
compilation ×1
compression ×1
package ×1
registry ×1
types ×1
versioninfo ×1
windows ×1