5,699,997 members and growing! (16,946 online)
Email Password   helpLost your password?
Languages » C# » How To     Intermediate License: The Code Project Open License (CPOL)

How To Disable FlashPlayer (AxShockwaveFlash) Right-click ContextMenu

By IncureForce

How to disable FlashPlayer (AxShockwaveFlash) right-click ContextMenu
C#.NET, .NET 1.0, .NET 1.1, .NET 2.0, .NET 3.0, .NET 3.5, Flash

Posted: 5 Sep 2008
Updated: 5 Sep 2008
Views: 2,471
Bookmarked: 9 times
Announcements
Loading...



Search    
Advanced Search
Sitemap
2 votes for this Article.
Popularity: 0.90 Rating: 3.00 out of 5
1 vote, 50.0%
1
0 votes, 0.0%
2
0 votes, 0.0%
3
0 votes, 0.0%
4
1 vote, 50.0%
5

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



Location: Austria Austria

Other popular C# articles:

Article Top
Sign Up to vote for this article
You must Sign In to use this message board.
FAQ FAQ Noise ToleranceSearch Search Messages 
 Layout  Per page   
  (Refresh) 
-- There are no messages in this forum --

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 5 Sep 2008
Editor: Deeksha Shenoy
Copyright 2008 by IncureForce
Everything else Copyright © CodeProject, 1999-2008
Web08 | Advertise on the Code Project