如题。

解决方案 »

  1.   

    unit Unit1;interfaceuses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs, StdCtrls, Grids;type
      TForm1 = class(TForm)
        StringGrid1: TStringGrid;
        procedure StringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer;
          Rect: TRect; State: TGridDrawState);
        procedure FormCreate(Sender: TObject);
        procedure FormClose(Sender: TObject; var Action: TCloseAction);
      private
        FBmp:TBitmap;
      public
        { Public declarations }
      end;var
      Form1: TForm1;implementation{$R *.dfm}procedure TForm1.StringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer;
      Rect: TRect; State: TGridDrawState);
    begin
      if (ACol=1) and (ARow=1) then
      begin
        StringGrid1.Canvas.Draw(Rect.Left,Rect.Top,FBmp);
      end;
    end;procedure TForm1.FormCreate(Sender: TObject);
    begin
      FBmp:=TBitmap.Create;
      FBmp.LoadFromFile('c:\1.bmp');
    end;procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
    begin
      FBmp.Free;
    end;end.