Link to home
Start Free TrialLog in
Avatar of philrumble
philrumble

asked on

Arguments to rundll32.exe c:\winnt\system32\mshtml.dll,PrintHTML command

Can anyone tell me the arguments to the following command?

rundll32.exe c:\winnt\system32\mshtml.dll,PrintHTML

I want to enable landscape printing and to get rid of the print dialog that pops up


Thanks

Prumble@ndsuk.com
Avatar of Cyril Joudieh
Cyril Joudieh
Flag of Lebanon image

If you want to print an html page, you can open it inside a WebBrowser Control inside Fox and print it using this:

#DEFINE OLECMDID_PRINT 6
#DEFINE OLECMDEXECOPT_PROMPTUSER 1
#DEFINE OLECMDEXECOPT_DONTPROMPTUSER ?
#DEFINE OLECMDID_FIND 32
#DEFINE OLECMDEXECOPT_DODEFAULT 0

PROCEDURE print
ON ERROR SET MESSAGE TO
KEYBOARD "{ALT+I}" && to set specific settings
*oBrowser.Webbrowser.ExecWB(OLECMDID_FIND, OLECMDEXECOPT_DODEFAULT, "", "")
*oBrowser.Webbrowser.ExecWB(OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER, 0, 0)
oBrowser.Webbrowser.ExecWB(OLECMDID_PRINT, OLECMDEXECOPT_PROMPTUSER, 0, 0)
ON ERROR &onerror
another method is to call shellexecute and let windows worry about printing:

= executgeshell(htmlpath,'print')
FUNCTION executeshell
LPARAMETERS cFile, cOperation, cDefaultDirectory
LOCAL nHwnd, cParameters, cDefaultDirectory, nShowCommand
DECLARE INTEGER ShellExecute IN shell32.dll AS ShellExecute;
      INTEGER nHwnd,;
      STRING @cOperation,;
      STRING @cFile,;
      STRING @cParameters,;
      STRING @cDefaultDirectory,;
      INTEGER nShowCommand
nHwnd = 0
cOperation = IIF(EMPTY(cOperation),'open',cOperation)
cParameters = NULL
cDefaultDirectory = IIF(EMPTY(cDefaultDirectory),'C:\Windows\Temp',cDefaultDirectory)
nShowCommand = 1
= ShellExecute(nHwnd, @cOperation, @cFile, @cParameters, @cDefaultDirectory, nShowCommand)
CLEAR DLLS
Avatar of philrumble
philrumble

ASKER

People,

Read the question!.... I want to be able to print from the console using the command

rundll32.exe c:\winnt\system32\mshtml.dll,PrintHTML

Thats it

Have Fun
I read your question but suggested different methods using FoxPro.
I thought you are printing from FoxPro using the shell. Sorry.

according to this:

http://support.microsoft.com/default.aspx?scid=kb;en-us;175306

PrintHTML has at least 4 parameters.

still looking for the parameters ...
I could not find the parameters in any of my MSDN documentations.

May I suggest that you move this question to Windows or Internet Explorer because it's not really a FoxPro question.
I just read the question.  

What does it have to do with FoxPro?  

Did you read the name of this section before posting your question?
Oooopppppps  SORRY i work on TEETH not EYES...... :)
Suhashegde,

I know you have great ways of pulling teeth. Can you uproot dirty politicians from their posts?

Cyril
Hey Captain,
why think of politics AND me ? I am nowhere near politics ............ I hate politics ............ i dont love politics ...... so on and on


Maybe he thinks posting the question in the foxpro area will get good answers than in the IE area. Shows how dedicated the experts here are ............... (TRUE isnt it ?) ...............
Yes dedicated are FoxPro experts. As for politics, I hate politics too. I am an honest person. :). Since you pull teeth all the time I thought maybe you wish to extend your services to something else ;).
entering into politics would make me get rid of my ( ** Good **) teeth. I am so bad at lying that someone might just jam me and get my teeth out. politicions are born liers .
A politican does not let his left hand know what his right hand is doing and vice versa. He also makes people look forward on their trip to hell.
Hey Captain ,
I think i need a break. I do pull teeth but not all the time. I just might end up pulling out mine as there would be no teeth left to pull if i start pulling out all the time.

I love politicians.  It gives me a legitimate excuse to intensely dislike their group of (sub)human beings.  They are expert at making the truth seem like a lie, and lies sound like the truth.

Q.  How can you tell if a politician is lying?
A.  If his lips are moving.

Q.  What do you call five politicians dead at the bottom of the sea?
A.  A good start.
Hey Carl,
Good one.

For the lighter part , Should we start a Jokes Excelusive for foxpro users ? I should carry on and on and on ..... we defineatly need to laugh for being healthy.
I laugh all the time.  There just is so much nonsense in the world to laugh ay.
What does a consultant do?
He takes the watch off your wrist and tells you the time.

What does a philosopher do?
He works so hard to be remembered after his death.

What does a dyslexic, agnostic and insomniac person do?
He stays up all night and wonders if there is a dog!
I got this elsewhere on EE

Salary theorem states that " Engineers , Doctors , Teachers can never earn as much as business executives and sales people."

This theorem can now be supported by a mathematical equation based on the following two postulates.

Postulate
1: Knowledge is Power
2: Time is money

As every student knows that
Power = Work\Time

Since
knowledge = Power
Time = Money

Solving for money we get
Knowledge = Work/money
Money = Work/Knowledge

Thus as knowledge approaches zero, Money approaches infinity, regardless of the amount of my work done.

CONCLUSION: The less you know the more you make.
philrumble,

if you wish to close this question, you can just choose any of my comments with a grade of "A". I will be more than grateful.

LOL :)

Cyril
I think The poster has enough of all this crap.
going on .....

a person walks in to a pet shop to buy a monkey.

three good looking monkeys well dressed are avaiable.

he enquires the price of each one thinking which one to buy.

buyer : How much does this fella costs ?
seller : well he is a little over $1000.

b: Why that much ?
S: he writes C ++ programs and is good in it.

B: oh. Thats a bit costy. What about the second one ?
S: He will cost $10,000. He writes complex C++ programs , debugs others programs and is well versed in .NET technology.

B: $10,000 no way , I will take the third one . How much ?
S : OH . HE is the COSTlyest fella round. He has a tag of $50,000

B: uuuuggggghhh , That much ? Whats so special about him ?
S : I didnt see much of him. Sits walks around and calls himselfs a consultant.



and sure more of these to come........ in the next post
On with the second one,

The same person walks into another pet shop to buy a parrot (thinks no more monkeys)
 the conversations goes like this.

B : I would like to have a good parrot.
S : Parrot , We have many types but Sir these three would be of interest to you.

B : whats so special about them ?
S : They are a bit costlier and do good work.

B: Work ? What sort of work ?
S: This one costs $500 , Sits on the sholder and notifies mistakes u make while programing .NET

B: Any cheaper ones ?
S: No Sir, In fact the second one here is good at Delphi and can make use of the latest .NET programing. Knows a lot about hardware and related stuff. He costs a good $750.

B: (thinks what's he worth) Okay, what about the third?
S: He is the costliest among them a good $2000 . I have seen him do nothing although these two always make way when ever he comes. they call him SENIOR.

......more on the way.
A software company thinks about humanising Cannibals and appoints 5 of them into their company. The head cannibal makes a promise not to eat any humans working in the Company as they are collegues.
Things move smoothly until one day ..
The Chief of the company comes over these Cannibals and questions about a missing Sweeper. The Head Cannibal swears that the group of his dont know the whereabouts of him and have NOT eaten him.
As soon as the Chief leaves the head Cannibal turns to the group and shouts in anger " Which one of U have eaten the Sweeper ?"
A member quietly raises this hand.
With uncontrolled anger the Head Cannibal Slaps him in the face and says " Why did U have to eat him. All these days we have been eating so many software developers,project leaders and project managers that no-one noticed them missing, then why did u EAT a SWEEPER ?"
As it happens with most of us ,
A couple are arguing and all hell breaks loose

Wife : U men are all the same. U listen in one ear and it comes out of the other.
Husband tired of listening these same old things over and over again yells back
" what about u women eh? u listen with both ears and get it out from your mouth "
ASKER CERTIFIED SOLUTION
Avatar of DarthMod
DarthMod
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial