Printing a StringGrid

Hello, I am usin BCB6 and trying to print out a StringGrid, I have found ton of examples for delphi but none for BCB, I have tried to convert the delphi code but got stuck on what

[CODE]uses
Printers;

procedure PrintGrid(sGrid: TStringGrid; sTitle: string);
var
[/CODE]


all that stuff is, So if you could help me out I would apprate it alot thanks
squills

Comments

  • I'm guessing you are referring to [link=http://www.delphitricks.com/source-code/printing/print_a_tstringgrid.html]THIS[/link] post.

    For:
    [code]uses Printers;[/code]

    In C++ that would look like:

    [code]#include [/code]

    As for:
    [code]procedure PrintGrid(sGrid: TStringGrid; sTitle: string);[/code]

    It's a function declaration. In C++ that would be something like:

    [code]void PrintGrid(TStringGrid *sGrid,AnsiString sTitle)[/code]


    As for the Printer itself, now, I haven't tried myself, but my guess is that you could do something like this:

    [code]TPrinter *Printer = new TPrinter();[/code]

    Hope this helps.
  • Thanks alot, After messing with it for awhile i finallly got it to work, but now I know what uses i for :D
    thanks
    squills

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories