Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/delphi/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
delphi IDE菜单中的图像是什么格式?_Delphi_Delphi 2007_Ota - Fatal编程技术网

delphi IDE菜单中的图像是什么格式?

delphi IDE菜单中的图像是什么格式?,delphi,delphi-2007,ota,Delphi,Delphi 2007,Ota,我将在DelphiIDE(Delphi 2007)的主菜单中添加一个新条目,并在与菜单相关联的图像列表中添加一个bmp图像(无需将掩码作为参数传递) 但是添加的图像不是以透明颜色显示的,我尝试使用8位和24位bmp,并使用fucsia作为背景色,但ide总是以背景显示图标。所以问题是我必须使用的bmp图像的颜色深度和背景颜色,以使图像在delphi ide菜单中显示为透明?或者我需要将蒙版bmp传递到图像。添加功能?尝试使用图标格式(.ico),大小为16x16和256色 这是我使用的代码,ma

我将在DelphiIDE(Delphi 2007)的主菜单中添加一个新条目,并在与菜单相关联的图像列表中添加一个bmp图像(无需将掩码作为参数传递)

但是添加的图像不是以透明颜色显示的,我尝试使用8位和24位bmp,并使用fucsia作为背景色,但ide总是以背景显示图标。所以问题是
我必须使用的bmp图像的颜色深度和背景颜色,以使图像在delphi ide菜单中显示为透明?
或者我需要将蒙版bmp传递到
图像。添加
功能?

尝试使用图标格式(.ico),大小为16x16和256色

这是我使用的代码,
main菜单
是IDE菜单项的实例

Image:=TIcon.Create;
try
 Image.Handle := LoadIcon(hInstance, sLogo16);
 ExplorerItem.ImageIndex:=MainMenu.Images.AddIcon(Image);
finally
  Image.Free;
end;

Image:=TIcon.Create;
try
 Image.Handle := LoadIcon(hInstance, sLogo16);
 ExplorerItem.ImageIndex:=MainMenu.Images.AddIcon(Image);
finally
  Image.Free;
end;