Click here to Skip to main content
Licence CPOL
First Posted 5 Sep 2008
Views 17,079
Downloads 432
Bookmarked 15 times

How To Disable FlashPlayer (AxShockwaveFlash) Right-click ContextMenu

By IncureForce | 5 Sep 2008
How to disable FlashPlayer (AxShockwaveFlash) right-click ContextMenu
1 vote, 16.7%
1

2

3

4
5 votes, 83.3%
5
4.43/5 - 6 votes
μ 4.43, σa 3.13 [?]

Introduction

In FlashPlayer, there is always this ContextMenu which never fits the design of the flash movie.

Background

I started making a FlashGame which has multiple clients and is always up-to-date with all other clients. This is very difficulty to manage with WebRequests and Intervals, so I decided to make my FlashGame in my C# application.

The only problem was that I have a new application but with the old ContextMenu which I hate so much. So I searched for a solution on this site, but I didn't find one. Then I started searching on Google and after some dead links and unmatching code snippets, I found a .NET Visual Basic solution which is easily translated into C# and here it is.

Using the Code

Just download the project and see how it works (if it works since it's my first article).

For all those who only want to know how the code looks like, here is the core (a small core, very small core):

public class IForcePlayer : AxShockwaveFlash
{
    const int WM_RBUTTONDOWN = 0x0204;

    protected override void WndProc(ref Message m)
    {
        if (m.Msg == WM_RBUTTONDOWN)
        {
            m.Result = IntPtr.Zero;
            return;
        }
        base.WndProc(ref m);
    }
}

History

  • 5th September, 2008: Initial post

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

IncureForce



Austria Austria

Member


Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
QuestionThanks only! Pinmemberemarti11:09 25 Dec '11  
GeneralMy vote of 5 Pinmemberemarti11:07 25 Dec '11  
GeneralMy problem was solved PinmemberBehrOOz-ice7:30 21 Aug '10  
Generali found this !! PinmemberBehrOOz-ice21:15 20 Aug '10  
Generalin VB .net PinmemberBehrOOz-ice20:45 20 Aug '10  
AnswerRe: in VB .net Pinmvpthatraja6:35 28 Jan '12  
Questioni have error on running this [modified] Pinmemberhgh6610:59 25 Jul '10  
GeneralSolution !? [modified] PinmemberIncureForce13:34 13 Sep '09  
GeneralNot working on VS 2005 PinmemberLorenz C5:29 18 Aug '09  
GeneralNice! PinmemberMichael Dolittle22:03 30 Jan '09  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Mobile
Web01 | 2.5.120210.1 | Last Updated 5 Sep 2008
Article Copyright 2008 by IncureForce
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid