borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (Packaging Internet Applications)Next Topic (Internet History) New Topic New Poll Post Reply
AndreaVB Forum : Internet Applications : Overloading Button click event
Poster Message
Harrism
Level: Guest


icon Overloading Button click event

Hi everybody its Dr Nick

Just a quick one which is the quickest and most effective way of overloading the button click event on a webbrowser object?

Cheers

Mark

10-12-2002 at 11:05 AM
| Quote Reply
vbgen
Level: Moderator

Registered: 10-10-2002
Posts: 876
icon Re: Overloading Button click event

help...

what do you mean by 'overloading' the button click?



____________________________
Been busy trying to take a second degree <--it's not working out...

10-12-2002 at 06:18 PM
View Profile Send Email to User Show All Posts | Quote Reply
Harrism
Level: Guest

icon Re: Overloading Button click event


Overload (intercept) the default browser message handler with you own handler and set it to disregard the right button click event but respond to other event in the normal fashion

Haha ive just sorted it, some java code on the pages works a treat intercepts the right click

Cheers

Mark

11-12-2002 at 11:21 AM
| Quote Reply
vbgen
Level: Moderator

Registered: 10-10-2002
Posts: 876
icon Re: Overloading Button click event

would you mind sharing it with us here at the forum?

____________________________
Been busy trying to take a second degree <--it's not working out...

11-12-2002 at 07:12 PM
View Profile Send Email to User Show All Posts | Quote Reply
Harrism
Level: Guest

icon Re: Overloading Button click event

Not a problemski

<script language=JavaScript>
<!--
var message="Source Not Available.";

function clickIE() {if (document.all) {alert(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {alert(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

document.oncontextmenu=new Function("return false")
// -->
</script>

12-12-2002 at 12:03 PM
| Quote Reply
vbgen
Level: Moderator

Registered: 10-10-2002
Posts: 876
icon Re: Overloading Button click event

hi!

thanks for the piece of code...

will try it.

later, Harrism.

____________________________
Been busy trying to take a second degree <--it's not working out...

12-12-2002 at 10:40 PM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : Internet Applications : Overloading Button click event
Previous Topic (Packaging Internet Applications)Next Topic (Internet History) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder