|
-
October 4th, 2001, 09:04 AM
#1
Printing
i need to print a emf file
-
October 4th, 2001, 09:12 AM
#2
Re: Printing
You could try...
\\ Declaration
Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (byval hwnd as Long, byval lpOperation as string, byval lpFile as string, byval lpParameters as string, byval lpDirectory as string, byval nShowCmd as Long) as Long
Using this API call and passing "Print" in the lpOperation parameter causes windows to print out the document using whichever application is associated with that document. The code to use this from a VB form is:
public Sub PrintDocument(byval sDocumentName as string)
Const SW_HIDE = 0
Dim lRet as Long
lRet = ShellExecute(me.hWnd, "print", sDocumentName, "","",SW_HIDE)
End Sub
If ShellExecute is successful, the return value (lRet) will be greater than 32.
HTH,
D.
-------------------------------------------------
Ex. Datis: Duncan Jones
Merrion Computing Ltd
http://www.merrioncomputing.com
Check out the new downloads - ImageMap.ocx is the VB control that emulates an HTML image map, EventVB.OCX for adding new events to your VB form and adding System Tray support simply, MCL Hotkey for implemenmting system-wide hotkeys in your application...all with source code included.
-
October 4th, 2001, 09:16 AM
#3
Really a pity...
...you know what: I am out of votes...
<Excelent!>
:wink
Special thanks to Lothar "the Great" Haensler, Tom Archer, Chris Eastwood, TCartwright, Bruno Paris, Dr_Michael
and all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
The Rater
...at present time, using mainly Net 4.0, Vs 2010
Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|