delphi圖片查看

procedure TxltjFram.dxDBGrid2PhotoButtonClick(Sender: TObject;
  AbsoluteIndex: Integer);
var
  strPath, str, D: string; // 文件路徑
begin
  inherited;
  strPath := dxDBGrid2.ColumnByFieldName('Photo').Field.AsString;
  str := StringReplace(strPath, '/', '\', [rfReplaceAll]);string

// D := copy(str, 2, length(str) - 1);
  ShellExecute(Handle, 'open', 'Explorer.exe', PAnsiChar('D:' + str), nil, 1); //('F:\WebProject\ProProWebTF' +str), nil, 1);//
end;it

相關文章
相關標籤/搜索