468,268 Members | 1,713 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,268 developers. It's quick & easy.

Browser extension button disabled after first use?

Hi,
I have added a button to IE backed by a COM object using C#. Iam
able to achieve the required functionality on the click of the button.
However, I am unable to click the button again, i.e., my toolbar button

gets disabled and grayed out. I have implemented
IOleCommandTarget::QueryStatus implementation method as follows:

public int QueryStatus(ref Guid pguidCmdGroup, int cCmds, IntPtr
prgCmds, IntPtr pCmdText)
{
OLECMD ocmd;
bool temp= true;
ocmd.cmdf=
(UInt32)OLECMDF.OLECMDF_ENABLED|(UInt32)OLECMDF.OL ECMDF_SUPPORTED;
Marshal.StructureToPtr(ocmd.cmdf,prgCmds,temp);
return 0;

}
public int Exec(ref Guid pguidCmdGroup, uint nCmdID, uint nCmdExecOpt,
object[] pvaIn, object[] pvaOut)
{
Speak();//This function works fine;actually the text on the web page

is read out here!
return 0;
}
Since the button is disabled after first use, iam not able to use it
for any other links from this page.Please somebody giude me where iam
wrong.

Thanks and Regards,
Sujoan.

Mar 31 '06 #1
0 901

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

13 posts views Thread by Kai Grossjohann | last post: by
11 posts views Thread by Dot net work | last post: by
5 posts views Thread by ns21 | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by kermitthefrogpy | last post: by
reply views Thread by zattat | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.