当前位置:首页
开发技术指南» 文章正文
    引言:
 

 

    摘要: 多谢回答! ......
    摘要: using axshdocvw; using shdocvw; 用axwebbrowser时出现的这个异常 未处理的“system.resources.missingmanifestresourceexception”类型的异常出现在 mscorlib.dll 中 其他信息:未能在给定的程序集中找到任何适合于指定的区域性(或非特定区域性)的资源。请确保已将“form2.resources”......


imagelist控件设计时创建并增加位图和运行时创建并增加位图的结果不同,怎么解决这个问题

以下是我在的一段增加工具条的代码,首先创建bitmap和imagelist控件,向bitmap中增加一个位图,并将bitmap加入到imagelist中。然后创建一个toolbar,并在这个toolbar上增加一个toolbutton,然后将toolbutton的imageindex设为0。  
   
          问题是,此时在toolbutton上显示出来的图标还有自己的背景色,而且将imagelist的bkcolor属性修改后对toolbutton的图标颜色没有任何影响,但是如果在设计时创建好imagelist,toolbar和toolbutton,那么toolbutton上的背景色就和按钮的颜色一样了。  
          如何在运行时创建imagelist使得toolbutton上的图标的背景色和按钮的颜色一样呢?  
   
  procedure   TForm1.Button6Click(Sender:   TObject);  
  var  
      MyTB:   TToolBar;  
      MyBt:   TToolButton;  
      MyImage:   TImageList;  
      Mybitmap:   Graphics.TBitmap;  
  begin  
      Mybitmap   :=   Graphics.TBitmap.Create;  
      Mybitmap.LoadFromFile(bitmap1.bmp);  
   
      MyImage   :=   TImageList.Create(Form1);  
      MyImage.Add(Mybitmap,nil);  
      MyImage.BkColor   :=   clRed;  
   
      MyTB   :=   TToolBar.Create(Self);  
      MyTB.Parent   :=   Form1;  
      MyTB.Color   :=   clAqua;  
      MyTB.Images   :=   ImageList1;  
   
      MyBt   :=   TToolButton.Create(self);  
      MyBt.Parent   :=   TWinControl(MyTB);  
      MyBt.ImageIndex   :=   0;  
  end;

NO.1   作者: sysu

MyImage.Add(Mybitmap,nil);  
  改为  
  MyImage.AddMasked(Mybitmap,   Mybitmap.Canvas.Pixels[0,0]);  
  //   取第一个象素点颜色用作透明色


 ·问个的问题。    »显示摘要«
    摘要: 我现在要弹出一个窗口,这个弹出文件中有一个上传文件的选项,上传后我想让这个窗口传一个变量值到原来的窗口,写到原来窗口的一个文本筐里面,如何实现? 我知道如果用iframe的话可以response.write "<script>parent.xxx.aaa.value+=变量</script>" 但是现在是弹出一个窗口。多谢。 ......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE