Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Blocking printing a web browser control

Posted on 2003-02-26
3
Medium Priority
?
151 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
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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 Month11 days, 19 hours left to enroll

564 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