Click here to Skip to main content
15,888,461 members
Home / Discussions / C#
   

C#

 
GeneralRe: from a datagrid in one to a textbox in another form Pin
Mazdak14-Mar-04 20:23
Mazdak14-Mar-04 20:23 
GeneralConvert Char[] to string Pin
dabuskol13-Mar-04 20:57
dabuskol13-Mar-04 20:57 
GeneralRe: Convert Char[] to string Pin
Heath Stewart15-Mar-04 3:20
protectorHeath Stewart15-Mar-04 3:20 
GeneralInsert Messages into game chat from c# app Pin
lordjpg13-Mar-04 20:08
lordjpg13-Mar-04 20:08 
GeneralRe: Insert Messages into game chat from c# app Pin
Mazdak14-Mar-04 5:03
Mazdak14-Mar-04 5:03 
GeneralRe: Insert Messages into game chat from c# app Pin
Heath Stewart15-Mar-04 3:37
protectorHeath Stewart15-Mar-04 3:37 
GeneralPrinting a web page Pin
draco_iii13-Mar-04 14:12
draco_iii13-Mar-04 14:12 
GeneralRe: Printing a web page Pin
Heath Stewart15-Mar-04 3:30
protectorHeath Stewart15-Mar-04 3:30 
Call AxWebBrowser.ExecWB with OLECMDID.OLECMDID_PRINT, and with the OLECMDEXECOPT enumeration you want (like OLECMDEXECOPT.OLECMDEXECOPT_PROMPT to show the print UI). If you read the documentation for the IDM_PRINT[^] (works the same as OLECMDID_PRINT), you can see what you can pass for the pvaIn and pvaOut params. For instance, to just print the page using the default printer without showing the UI, you could do the following:
object pvaIn = 1; // PRINT_DONTBOTHERUSER
object pvaOut = null;
axWebBrowser1.ExecWB(OLECMDID.OLECMDID_PRINT,
  OLECMDEXECOPT.OLECMDEXECOPT_DONTPROMPTUSER, ref pvaIn, ref pvaOut);
Executing commands on the AxWebBrowser control (from creating an ActiveX interop assembly on the shdocvw.dll library, as is common) is the same as getting the IOleCommandTarget, which does the same functionality as using the various commands from the Internet Explorer (iexplore.exe) application. So, if you passed parameters to prompt the user to pick a printer and change other options, it would be the same as File-<Print in Internet Explorer.

 

Microsoft MVP, Visual C#
My Articles
GeneralRe: Printing a web page Pin
Michael Flanakin17-Mar-04 19:00
Michael Flanakin17-Mar-04 19:00 
GeneralRendering successive blanks in HTML Pin
Gary Hyslop at home13-Mar-04 8:31
Gary Hyslop at home13-Mar-04 8:31 
GeneralRe: Rendering successive blanks in HTML Pin
Dave Kreskowiak14-Mar-04 12:26
mveDave Kreskowiak14-Mar-04 12:26 
GeneralRe: Rendering successive blanks in HTML Pin
Heath Stewart15-Mar-04 6:48
protectorHeath Stewart15-Mar-04 6:48 
GeneralFocus Problems in C# Pin
ptrainor13-Mar-04 7:56
ptrainor13-Mar-04 7:56 
GeneralRe: Focus Problems in C# Pin
ptrainor14-Mar-04 6:43
ptrainor14-Mar-04 6:43 
GeneralChanging Form Client Region Pin
forak13-Mar-04 6:58
forak13-Mar-04 6:58 
GeneralRe: Changing Form Client Region Pin
Mathew Hall13-Mar-04 16:45
Mathew Hall13-Mar-04 16:45 
GeneralDirectX Bitmaps Pin
Flecko13-Mar-04 5:02
Flecko13-Mar-04 5:02 
GeneralRe: DirectX Bitmaps Pin
Hiro_Antagonist13-Mar-04 10:33
Hiro_Antagonist13-Mar-04 10:33 
GeneralRe: DirectX Bitmaps Pin
Flecko13-Mar-04 11:32
Flecko13-Mar-04 11:32 
GeneralRe: Extract Data from XML -&gt; DataSet -&gt; DataGrid Pin
John Fisher13-Mar-04 7:57
John Fisher13-Mar-04 7:57 
GeneralConsole Application Pin
mil_an13-Mar-04 3:58
mil_an13-Mar-04 3:58 
GeneralRe: Console Application Pin
John Fisher13-Mar-04 4:26
John Fisher13-Mar-04 4:26 
GeneralRe: Console Application Pin
mil_an13-Mar-04 10:24
mil_an13-Mar-04 10:24 
GeneralRe: Console Application Pin
Nick Parker13-Mar-04 10:45
protectorNick Parker13-Mar-04 10:45 
GeneralRe: Console Application Pin
mil_an13-Mar-04 8:12
mil_an13-Mar-04 8:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.