有没有办法将Delphi IDE菜单项Tools-> JCL Options ...移动到工具菜单的底部?

屏幕截图

以下源代码用于产生上述错误.您所要做的就是编译程序并确保IDE仍在运行(如果IDE关闭则不会发生错误),单击按钮12到15次,将弹出错误.
一旦发生错误,切换回IDE,IDE的所有工具栏都会消失.您必须关闭IDE并再次运行,才能重新出现.
源代码
unit MainUnit;
interface
uses
  Winapi.Windows, Winapi.Messages, Winapi.ShlObj, System.SysUtils,
  System.Variants, System.Classes, System.StrUtils, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.StdCtrls;
type
  TMainFrm = class(TForm)
    Button1: TButton;
    procedure FormCreate(Sender: TObject);
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;
var
  MainFrm: TMainFrm;
  hDesktop: HWND;
implementation
{$R *.dfm}
function GetHandle(theHandle: HWND; NotUsed: NativeInt): LongBool; stdcall;
begin
  if (theHandle <> 0) then
  begin
    hDesktop := FindWindowEx(FindWindowEx(theHandle, 0, 'SHELLDLL_DefView',
      nil), 0, 'SysListView32', nil);
  end;
  Result := (hDesktop = 0);
end; …Run Code Online (Sandbox Code Playgroud) 我正在尝试在写保护的USB驱动器上测试应用程序,我想使用ShellExecuteEx API(我需要使用此API调用,因为我需要lpVerb:="runas")调用来执行第二个程序,但是我使用ShellExecuteEx调用继续获得"写保护错误".我似乎无法弄清楚是什么试图写入驱动器,我没有写入驱动器的代码,我甚至使用最新的Microsoft标准用户分析器和应用程序验证程序来尝试验证试图写入驱动器的内容开车没有成功.这是我一直得到的错误:
[写保护错误]

以下代码中没有任何内容试图写入此驱动器,ShellExecuteEx API调用错误的方法来执行我正在尝试的操作吗?如果没有,我怎么能弹出这个错误.任何帮助将不胜感激.
[WP-ON.reg]
REGEDIT4
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies]
"WriteProtect"=dword:00000001
Run Code Online (Sandbox Code Playgroud)
[WP-OFF.reg]
REGEDIT4
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies]
"WriteProtect"=dword:00000000
Run Code Online (Sandbox Code Playgroud)
注:每次更新注册表时,必须弹出并重新插入设备.
[project1.dpr]
program project1;
{.$APPTYPE CONSOLE}
uses
  Windows, SysUtils;
begin
  Windows.MessageBox(Windows.GetActiveWindow(),
    PChar('Hello World!'), PChar('project1'), MB_OK);
end.
Run Code Online (Sandbox Code Playgroud)
[launch.manifest]
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity processorArchitecture="x86" version="2.0.1.0" name="eyeClaxton.asInvoker.Launch" type="win32" />
<description>asInvoker Launch</description>
<dependency>
    <dependentAssembly>
        <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" publicKeyToken="6595b64144ccf1df" language="*" processorArchitecture="x86" />
    </dependentAssembly>
</dependency>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
        <requestedPrivileges>
            <requestedExecutionLevel level="asInvoker" uiAccess="false" />
        </requestedPrivileges>
    </security>
</trustInfo>
</assembly>
Run Code Online (Sandbox Code Playgroud)
[launch.dpr]
program launch;
uses
  Windows, ShellAPI; …Run Code Online (Sandbox Code Playgroud) 在此处下载源代码:http://www.eyeClaxton.com/download/delphi/ColorSwap.zip
是的,我想把"大多数是蓝色"的东西转换成"大多数是绿色"的东西.
我想采用原始位图(浅蓝色)并将颜色(Pixel by Pixel)更改为红色,绿色,蓝色和灰色等效关系.为了了解我的意思,我已经包含了源代码和屏幕截图.任何帮助将不胜感激.如果需要更多信息,请随时询问.
如果您可以查看下面的代码,我有三个功能,我正在寻求帮助.功能"RGBToRed,RGBToGreen和RGBToRed"我似乎无法提出正确的公式.

unit MainUnit;
interface
uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ExtCtrls, StdCtrls;
type
  TMainFrm = class(TForm)
    Panel1: TPanel;
    Label1: TLabel;
    Panel2: TPanel;
    Label2: TLabel;
    Button1: TButton;
    BeforeImage1: TImage;
    AfterImage1: TImage;
    RadioGroup1: TRadioGroup;
    procedure FormCreate(Sender: TObject);
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;
var
  MainFrm: TMainFrm;
implementation
{$R *.DFM}
function RGBToGray(RGBColor: TColor): TColor;
var
  Gray: Byte;
begin
  Gray := Round(
    (0.90 * …Run Code Online (Sandbox Code Playgroud) 在这里下载带有已编译可执行文件的源代码(大小:161 KB(165,230字节)):http://www.eyeClaxton.com/download/delphi/ColorSwap.zip
原始位图大小仅为28x15像素,颜色为浅蓝色.我希望能够单击右侧的任何彩色面板,并将原始位图颜色从浅蓝色更改为面板的颜色.
如果你点击灰色面板,你可以看到这个在行动,我只是无法弄清楚如何正确使用其他颜色.任何帮助将不胜感激.如果需要更多信息,请随时询问.
我之前已经问过这个问题,但是我无法弄清楚我想要做什么,所以我希望这个问题有点清楚.

unit MainUnit;
interface
uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ExtCtrls, StdCtrls;
type
  TMainFrm = class(TForm)
    Panel1: TPanel;
    Label1: TLabel;
    Panel2: TPanel;
    Label2: TLabel;
    BeforeImage1: TImage;
    AfterImage1: TImage;
    Panel3: TPanel;
    Panel4: TPanel;
    Panel5: TPanel;
    Panel6: TPanel;
    Panel7: TPanel;
    Panel8: TPanel;
    Panel9: TPanel;
    Image1: TImage;
    Label3: TLabel;
    Panel10: TPanel;
    Memo1: TMemo;
    Label4: TLabel;
    procedure FormCreate(Sender: TObject);
    procedure Panel4Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public …Run Code Online (Sandbox Code Playgroud) 谁能告诉我,为什么我一直收到以下错误?
背景:
该项目有320个嵌入式表格.
项目搜索路径有205个文件夹,长度超过11,000个字符.
如果我只注释掉一个嵌入的表单单元,那么它会编译而不会出错.
图像#1 - 来自Delphi IDE

图像#2 - 来自DCC32.EXE

这是我用于嵌入表单的单元
unit EmbeddedForm;
interface
{$INCLUDE '..\INCLUDE\BUILD.INC'}
uses
  Windows, Controls, Messages, Forms;
type
  TEmbeddedForm = class(TForm)
    procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
  private
    { Private declarations }
    procedure StopFlicker(var theMessage: TWMEraseBkgnd); message WM_ERASEBKGND;
  protected
    { Protected declarations }
    procedure CreateParams(var Params: TCreateParams); override;
  public
    { Public declarations }
    procedure InitializeForm(); virtual; abstract;
    procedure FinalizeForm(); virtual; abstract;
  end;
implementation
{$R *.DFM}
procedure TEmbeddedForm.StopFlicker(var theMessage: …Run Code Online (Sandbox Code Playgroud) 我们有这个应用程序不写入Windows注册表或将其配置文件(如INI文件)存储在用户的配置文件中; 相反,它将其配置文件存储在程序的目录中.维基百科有此声明
便携式应用程序(便携式应用程序)是一种计算机软件程序,旨在独立于操作系统运行.这种类型的应用程序存储在可移动存储设备上,例如CD,USB闪存驱动器,闪存卡 - 仅在存储介质上存储其程序文件,配置信息和数据.
所以我们的问题是,这会使我们的应用程序成为真正的便携式应用程序(便携式应用程
我应该指出,如果应用程序在写保护介质上,我们使用下面的函数,因此它不会尝试写入该介质.
function GetTempFile(): string;
var
  Buffer: array[0..MAX_PATH] of Char;
begin
  Windows.ZeroMemory(@Buffer, System.SizeOf(Buffer));
  SysUtils.StrPCopy(Buffer, SysUtils.ExcludeTrailingBackslash(SysUtils.ExtractFilePath(System.ParamStr(0))));
  Windows.GetTempFileName(Buffer, '~', 0, Buffer);
  Result := string(Buffer);
end;
function IsMediumWriteProtected(): Boolean;
var
  ErrorMode: Word;
  hHandle: THandle;
begin
  ErrorMode := Windows.SetErrorMode(SEM_FAILCRITICALERRORS);
  try
    hHandle := Windows.CreateFile(PChar(GetTempFile()), GENERIC_WRITE, 0, nil, 
      CREATE_ALWAYS, FILE_ATTRIBUTE_TEMPORARY or FILE_FLAG_DELETE_ON_CLOSE, 0);
    try
      Result := (hHandle = INVALID_HANDLE_VALUE);
    finally
      Windows.CloseHandle(hHandle);
    end;
  finally
    Windows.SetErrorMode(ErrorMode);
  end;
end;
Run Code Online (Sandbox Code Playgroud) delphi ×7
delphi-7 ×3
ide ×3
bitmap ×2
colors ×2
delphi-xe2 ×2
windows ×2
jedi ×1
portability ×1
windows-7 ×1