Think I've already asked this a while back, and apologies if I have. Does
anyone know a good way to pick up a file in VFP and throw it at a printer?
The PJL/PCL/whatever codes are already embedded in the file, and I want the
formatted output from the printer, rather than the plaintext with coding
version, if you see what I mean.

Any help much appreciated.

OT: A man walks a mile south, then a mile east, then a mile north. He ends
up in the same place he started from. He sees a bear. What color is the
bear?

Re: Print from file to printer by Stefan

Stefan
Wed Oct 27 01:48:05 CDT 2004

If you want to print "any" file/format, ShellExecute() works as long as
Windows knows what to do with the extension.
Declare integer ShellExecute In Shell32.dll ;
integer, string, string, string, string, integer
ShellExecute(0,'print', cFile, "","",0)


hth
-Stefan

"Neil Waterworth" <nospam_nwaterworth@nospam-lineone.net> schrieb im Newsbeitrag
news:e6vtHb7uEHA.3896@TK2MSFTNGP09.phx.gbl...
> Think I've already asked this a while back, and apologies if I have. Does
> anyone know a good way to pick up a file in VFP and throw it at a printer?
> The PJL/PCL/whatever codes are already embedded in the file, and I want the
> formatted output from the printer, rather than the plaintext with coding
> version, if you see what I mean.
>
> Any help much appreciated.
>
> OT: A man walks a mile south, then a mile east, then a mile north. He ends
> up in the same place he started from. He sees a bear. What color is the
> bear?
>
>


Re: Print from file to printer by Andrew

Andrew
Wed Oct 27 02:13:57 CDT 2004

Neil Waterworth wrote:
> OT: A man walks a mile south, then a mile east, then a mile north. He
> ends up in the same place he started from. He sees a bear. What color
> is the bear?

* spoiler space

























White. But I knew that already ;) do you know anyone that worked it out?
--
Regards
Andrew Howell



Re: Print from file to printer by Steve

Steve
Wed Oct 27 03:01:30 CDT 2004

>
> OT: A man walks a mile south, then a mile east, then a mile north. He ends
> up in the same place he started from. He sees a bear. What color is the
> bear?
>
>
White (North Pole)

Re: Print from file to printer by Rolf

Rolf
Wed Oct 27 03:46:14 CDT 2004

> The PJL/PCL/whatever codes are already embedded in the file,

m.file = "c:\file.txt"
m.printer = \\server\hp4" && or LPT1,LPT2
copy file ( m.file ) to ( m.printer )


> What color is the bear?

There are no bears at the North Pole.
A little south of the pole you will find some.



Re: Print from file to printer by Leonid

Leonid
Wed Oct 27 10:33:41 CDT 2004

"Steve Fisher" <steve.fisher@fernite.co.uk> wrote in message
news:clnkkq$rip$1@hercules.btinternet.com...
>>
>> OT: A man walks a mile south, then a mile east, then a mile north. He
>> ends
>> up in the same place he started from. He sees a bear. What color is the
>> bear?
>>
>>
> White (North Pole)


Actually the place might be near the South Pole, but I doubt there are bears
of any color there

Leonid



Re: Print from file to printer by Gene

Gene
Wed Oct 27 10:54:25 CDT 2004

Steve Fisher <steve.fisher@fernite.co.uk> wrote:

>> OT: A man walks a mile south, then a mile east, then a mile north. He ends
>> up in the same place he started from. He sees a bear. What color is the
>> bear?

>White (North Pole)

The bear might be a black bear that escaped a plane crash.

Given the directions and distances, the location is not
necessarily the North Pole. Find the other locations. There are an
infinite number of them.

Sincerely,

Gene Wirchenko

Computerese Irregular Verb Conjugation:
I have preferences.
You have biases.
He/She has prejudices.

totally OT: NWSE by Olaf

Olaf
Wed Oct 27 12:10:28 CDT 2004

> Given the directions and distances, the location is not
> necessarily the North Pole. Find the other locations. There are an
> infinite number of them.
Yes, indeed.

If you start at a point near the southpole
and by going one mile south reach the
longitude where going one mile east will
be walking a complete circle, then you would
get back to where you came from, by walking
one mile north again.

A circle with a radius of 1mile/2*Pi would
have an Extent of 1 mile. That's about 0.16
miles. So you could start anywhere 1.16 miles
north from the south pole and go as described
to reach where you came from.

You'd not walk something quite similar to
a triangle, but a circle with a line...

Bye, Olaf.



Re: totally OT: NWSE by Gene

Gene
Wed Oct 27 17:06:26 CDT 2004

"Olaf Doschke" <T2xhZi5Eb3NjaGtlQFNldG1pY3MuZGU@strconv.14> wrote:

>> Given the directions and distances, the location is not
>> necessarily the North Pole. Find the other locations. There are an
>> infinite number of them.
>Yes, indeed.
>
>If you start at a point near the southpole
>and by going one mile south reach the
>longitude where going one mile east will
>be walking a complete circle, then you would
>get back to where you came from, by walking
>one mile north again.

Or more than one circle.

>A circle with a radius of 1mile/2*Pi would
>have an Extent of 1 mile. That's about 0.16
>miles. So you could start anywhere 1.16 miles
>north from the south pole and go as described
>to reach where you came from.

Or closer.

>You'd not walk something quite similar to
>a triangle, but a circle with a line...

It would be a triangle, a special triangle.

Sincerely,

Gene Wirchenko

Computerese Irregular Verb Conjugation:
I have preferences.
You have biases.
He/She has prejudices.

Re: Print from file to printer by Neil

Neil
Wed Oct 27 17:26:15 CDT 2004

Thanks for the answers to the print questions. Still not quite found the
right solution, because I've found it needs formatting to fit the page
first. Guess I'm looking at automation unless I can do something with a
report. Was meant to be an easy job.

OT bit: The polar bear Q came from some site which was listing MS interview
Qs. I was interviewing a couple of days ago and was looking for some dumb
questions from Google. No, I didn't ask it. If I'd found a suitable penguin
Q, it might have been different.

You can find loads of this stuff Google searching "Microsoft interview
questions" and similar.

Cheers,
Neil



"Neil Waterworth" <nospam_nwaterworth@nospam-lineone.net> wrote in message
news:e6vtHb7uEHA.3896@TK2MSFTNGP09.phx.gbl...
> Think I've already asked this a while back, and apologies if I have. Does
> anyone know a good way to pick up a file in VFP and throw it at a printer?
> The PJL/PCL/whatever codes are already embedded in the file, and I want
the
> formatted output from the printer, rather than the plaintext with coding
> version, if you see what I mean.
>
> Any help much appreciated.
>
> OT: A man walks a mile south, then a mile east, then a mile north. He ends
> up in the same place he started from. He sees a bear. What color is the
> bear?
>
>



Re: Print from file to printer by Neil

Neil
Wed Oct 27 17:40:29 CDT 2004

> The bear might be a black bear that escaped a plane crash.

Or a Koala?



Re: Print from file to printer by Gene

Gene
Wed Oct 27 20:37:26 CDT 2004

"Neil Waterworth" <nospam_nwaterworth@nospam-lineone.net> wrote:

>> The bear might be a black bear that escaped a plane crash.
>
>Or a Koala?

Are they actually bears? I thought they were mislabelled
marsupials.

Sincerely,

Gene Wirchenko

Computerese Irregular Verb Conjugation:
I have preferences.
You have biases.
He/She has prejudices.

Re: Print from file to printer by Arnaud

Arnaud
Thu Oct 28 05:09:08 CDT 2004

Hi Rolf,
I want to do the same thing, but the printers are not on a server,
they are local, known by their IP address.
I can't do :

copy file ( m.file ) to ( "10.1.1.162")

it will create a file, named 10.1.1.162 in the default directory...

How to process ?
Thanks
Arnaud

"Rolf Lystad" wrote:

> > The PJL/PCL/whatever codes are already embedded in the file,
>
> m.file = "c:\file.txt"
> m.printer = \\server\hp4" && or LPT1,LPT2
> copy file ( m.file ) to ( m.printer )
>
>
> > What color is the bear?
>
> There are no bears at the North Pole.
> A little south of the pole you will find some.
>
>
>

RE: Print from file to printer by JoeRobison

JoeRobison
Thu Oct 28 09:53:05 CDT 2004

If you just need to print a PCL preformatted report there are 2 ways
neither of which requires using Foxpro

1) go to DOS & copy filename to lpt1 (assuming you have mapped a printer to
lpt1)

2) There is a program named printfile where you just drag the report to the
icon & it will print on your default printer --- I believe it is shareware
but will verify
contact me directlyson@datamailusa.com
"Neil Waterworth" wrote:

> Think I've already asked this a while back, and apologies if I have. Does
> anyone know a good way to pick up a file in VFP and throw it at a printer?
> The PJL/PCL/whatever codes are already embedded in the file, and I want the
> formatted output from the printer, rather than the plaintext with coding
> version, if you see what I mean.
>
> Any help much appreciated.
>
> OT: A man walks a mile south, then a mile east, then a mile north. He ends
> up in the same place he started from. He sees a bear. What color is the
> bear?
>
>
>

Re: Print from file to printer by Fred

Fred
Thu Oct 28 10:09:42 CDT 2004

How about this instead:

copy file ( m.file ) to ( "\\10.1.1.162\printersharename")

--
Fred
Microsoft Visual FoxPro MVP


"Arnaud" <Arnaud@discussions.microsoft.com> wrote in message
news:EE744714-A8E0-49F7-9367-6D623B13F918@microsoft.com...
> Hi Rolf,
> I want to do the same thing, but the printers are not on a server,
> they are local, known by their IP address.
> I can't do :
>
> copy file ( m.file ) to ( "10.1.1.162")
>
> it will create a file, named 10.1.1.162 in the default directory...
>
> How to process ?
> Thanks
> Arnaud
>
> "Rolf Lystad" wrote:
>
>> > The PJL/PCL/whatever codes are already embedded in the file,
>>
>> m.file = "c:\file.txt"
>> m.printer = \\server\hp4" && or LPT1,LPT2
>> copy file ( m.file ) to ( m.printer )
>>
>>
>> > What color is the bear?
>>
>> There are no bears at the North Pole.
>> A little south of the pole you will find some.
>>
>>
>>