473,386 Members | 1,738 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

MsHtmHstInterop SetUIHandler revert to default

After doing a SetUIHandler how to I revert back to the default
behavior?

I'm using

ICustomDoc cDoc = (ICustomDoc)this.wb.Document;
cDoc.SetUIHandler((IDocHostUIHandler)this);

to allow JavaScript to call functions in C#. Once this is done many
things change in terms of behavior in the browser. I tried setting it
back to the default handler by trying

cDoc.SetUIHandler(null);

but this event still fires:

void IDocHostUIHandler.GetExternal(out object ppDispatch)

setting ppDispatch = null in this function didn't stop GetExternal
from over riding keyboard strokes (<enter>) either.

So - any ideas on how to revert back to the default handler?

-ben
Nov 16 '05 #1
1 3948
wiseleyb wrote:
After doing a SetUIHandler how to I revert back to the default
behavior?

I'm using

ICustomDoc cDoc = (ICustomDoc)this.wb.Document;
cDoc.SetUIHandler((IDocHostUIHandler)this);

to allow JavaScript to call functions in C#. Once this is done many
things change in terms of behavior in the browser. I tried setting it
back to the default handler by trying

cDoc.SetUIHandler(null);

but this event still fires:

void IDocHostUIHandler.GetExternal(out object ppDispatch)

setting ppDispatch = null in this function didn't stop GetExternal
from over riding keyboard strokes (<enter>) either.

So - any ideas on how to revert back to the default handler?


Set ppDispatch to something != null, like:

ppDispatch = new Object();

You probably also have to renavigate/reload the document.

bye
Rob
Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: MB | last post by:
Hi all I have 02 questions for you please help me if you have an idea 1) I'm looking for a tools to profile SOAP messages (between a client and web Services) please if you have a good Link...
0
by: Clemens Chiba - Greentube I.E.S. AG | last post by:
Hi! I implemented an interface for IDocHostUIHandler to be able to switch off scroll bar, border, ... by default in my axWebBrowser control. I used the code of John posted here nearly 2 years...
6
by: Chris Lewis | last post by:
Hi, We have just experienced a very frustrating and time-consuming problem after applying Windows 2K updates to our webservers over the weekend, and I though I'd share this in case anyone else...
7
by: Bernard D | last post by:
Hi, I've just been asked to bring a couple of Access 97 apps up to date. The source files are 'difficult to locate' as they were done in 1999. I have the mde files, but Access says it can't...
3
by: Rick Brandt | last post by:
I am using some buttons to hide/show various divs and am changing the style of the button to indicate which button's view is "active". My problem is that for the non-active buttons I want the...
2
by: san | last post by:
Hello, i am in great trouble. I want to revert back to original state of database before i performed restore database on my sql server 2K Database. Accidently i didn't take backup of my Database...
5
by: mydogisbox | last post by:
I have two datasets. One dataset table from dataset1 is bound to a list box. On selection in the list box dataset2 has 9 tables that are populated from the database. these tables are then...
0
by: SM | last post by:
Hi, #1 I did some changes in my inherited form (change some properties of my components), now I want to rollback all changes made in inherited form and return to the same state as the...
0
by: =?Utf-8?B?R2lubw==?= | last post by:
If I provide a user with the ability to change some settings in a VS2005 solution using my.settings and then republish the application to fix a bug or add a new feature the settings get lost due...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.