Click here to Skip to main content
15,886,056 members
Articles / Programming Languages / C#

Add Context Sensitive Functionality to a Windows Forms Control

Rate me:
Please Sign up or sign in to vote.
4.07/5 (3 votes)
10 Feb 20066 min read 39.7K   418   18  
Replace the right-click menu with something graphical.
using System;

namespace RestlessCues
{
	/// <summary>
	/// Summary description for CueEvents raised by CueAdaptor
	/// 
	/// Revision History:
	/// v1.0 7th February 2006
	/// </summary>
    public delegate void CueMouseEnterHandler(object sender, CueEventArgs e);
    public delegate void CueMouseLeaveHandler(object sender, CueEventArgs e);
	public delegate void CueSelectedEventHandler(object sender, CueEventArgs e);
	public delegate void CueClickEventHandler(object sender, CueEventArgs e);

	// *****************************************
	// Cue Object Event Args
	// *****************************************
	public class CueEventArgs : EventArgs
	{
		private CueAdaptor cue;
		public CueAdaptor Cue
		{
			get { return cue; }
			set { cue = value; }
		}

		public CueEventArgs(CueAdaptor cue)
		{
			this.Cue = cue;
		}
	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
United Kingdom United Kingdom
I have been working in the IT industry for 12 years. My previous career was in Mechanical Engineering, in a factory getting my hands dirty. I live in the UK, near the port of Harwich with a good view of Felixstowe, excellent for ship watching. My IT interests include C#, SQL Server and UML. I also enjoy trying to give non-IT literate people some understanding of what IT is and what it is doing for them.

Comments and Discussions