Hi Folks,
need some help with converting the following QBasic code to Dalphi

LPRINT chr$(27);"[@";chr$(4);chr$(0);chr$(0);chr$(0);chr$(34);chr$(0)

It prints double line spacing, double character height.

the Delphi code
write(#27'W1' + 'Test page') - Double width printing
works ok

Thanks

Ken

Member Avatar for Micheus

Hi Folks,
need some help with converting the following QBasic code to Dalphi

LPRINT chr$(27);"[@";chr$(4);chr$(0);chr$(0);chr$(0);chr$(34);chr$(0)

It prints double line spacing, double character height.

the Delphi code
write(#27'W1' + 'Test page') - Double width printing
works ok

Thanks

Ken

I think is very similar:
1) using char notation
write(#27'[@'#4#0#0#0#34#0);
2) using Chr function and decimal notation
write(Chr(27)+'[@'+Chr(4)+Chr(0)+Chr(0)+Chr(0)+Chr(34)+Chr(0));
3) using Chr function and hexadecimal notation
write(Chr($1B)+'[@'+Chr($4)+Chr($0)+Chr($0)+Chr($0)+Chr($22)+Chr($0));

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.