?
Solved

Blocking printing a web browser control

Posted on 2003-02-26
3
Medium Priority
?
148 Views
Last Modified: 2010-05-01
I have a web browser control on a VB.NET form which will be used for displaying Word documents. I want to prevent the user from printing using the Ctrl-P shortcut. Presumably I need some sort of alternate event handler for this, but it's got me stumped. Any thoughts?
0
Comment
Question by:hallpeter
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 3

Accepted Solution

by:
Da_Weasel earned 75 total points
ID: 8027309
There is no KeyPress/KeyDown/KeyUp events for it, so you can't even capture the keyboard events.
You would have to subclass the WebBrowser control and peak at the WM_CHAR events, and ignore the appropriate key sequences.
0
 

Assisted Solution

by:merphie
merphie earned 75 total points
ID: 8027976
You could use a API hook on the windows messages for that window.    Then you could intercept all Keyboard Commands.

The Webbrowser doesn't expose many functions to the programmers.    
0
 

Expert Comment

by:CleanupPing
ID: 8901077
hallpeter:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Experts: Post your closing recommendations!  Who deserves points here?
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month10 days, 20 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question