新建一个项目;
在窗体上弄个toolbar[增加几个按钮]'
然后在FormCreate时间里加上"  DoubleBuffered:=True;"
D5运行正常;
D10却显示黑的!!
去掉  DoubleBuffered:=True;这句话就都正常了;
//Delphi2010
unit Unit1;interfaceuses
  Windows, Messages, SysUtils,  Classes, Graphics, Controls, Forms,
  Dialogs, ComCtrls, ToolWin;type
  TForm1 = class(TForm)
    ToolBar1: TToolBar;
    ToolButton1: TToolButton;
    ToolButton2: TToolButton;
    ToolButton3: TToolButton;
    ToolButton4: TToolButton;
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;var
  Form1: TForm1;implementation{$R *.dfm}procedure TForm1.FormCreate(Sender: TObject);
begin
     DoubleBuffered:=True;
end;end.//Delphi5unit Unit1;interfaceuses
  Windows, Messages, SysUtils,  Classes, Graphics, Controls, Forms,
  Dialogs, ExtCtrls, jpeg, StdCtrls,CommCtrl, Menus, 
  ToolWin, ComCtrls  ;type
  TForm1 = class(TForm)
    ToolBar1: TToolBar;
    ToolButton1: TToolButton;
    ToolButton2: TToolButton;
    ToolButton3: TToolButton;
    ToolButton4: TToolButton;
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;var
  Form1: TForm1;implementation{$R *.DFM}procedure TForm1.FormCreate(Sender: TObject);
begin
  DoubleBuffered:=True;
end;end.

解决方案 »

  1.   

    常规问题.
    不用D10 就没事啦
    uincode 有第三方支持啊.
      

  2.   

    和 uincode  毛关系?;
    不是很多人使用了吗;还有些语法也增加了;
      

  3.   

    和unicode应该没关系,
    我电脑上没安装D2010,您按F1查看一下帮助文档吧.
      

  4.   


    procedure TForm1.FormCreate(Sender: TObject);
    begin
      ToolBar1.Transparent := False;
      DoubleBuffered := True;
    end;
      

  5.   

    还是嘿的;
    由于设计时加了 showcapton=true 这句话的缘故; 
      

  6.   


    toolbar属性设置下;showcaption=true!!! 就有了哈
      

  7.   


    试下!toolbar1.showcaption:=true
      

  8.   

    两种编译器,能编出一样的exe?一种是原生程序,一种是.net程序,能一样?
    同样的代码,D5和D10 效果不一样,很正常
      

  9.   

    我试了下,如果加了 toolbar1.showcaption:=true。就会黑掉。只能把 doublebuffer这句去掉