Click here to Skip to main content
15,915,076 members
Home / Discussions / C#
   

C#

 
GeneralRe: Localizable Pin
CillyMe2-Dec-03 4:17
CillyMe2-Dec-03 4:17 
GeneralRe: Localizable Pin
Heath Stewart2-Dec-03 4:26
protectorHeath Stewart2-Dec-03 4:26 
GeneralRe: Localizable Pin
CillyMe2-Dec-03 15:53
CillyMe2-Dec-03 15:53 
QuestionHow can i create vedio file from collection of images in C# Pin
KRathor1-Dec-03 18:43
KRathor1-Dec-03 18:43 
AnswerRe: How can i create vedio file from collection of images in C# Pin
Heath Stewart1-Dec-03 18:59
protectorHeath Stewart1-Dec-03 18:59 
GeneralRe: How can i create vedio file from collection of images in C# Pin
KRathor1-Dec-03 19:10
KRathor1-Dec-03 19:10 
GeneralPassing Data between forms Pin
Jeff Patterson1-Dec-03 17:47
Jeff Patterson1-Dec-03 17:47 
GeneralRe: Passing Data between forms Pin
Nick Parker1-Dec-03 18:26
protectorNick Parker1-Dec-03 18:26 
Jeff,
You should check into delegates, events, and eventargs. You can derive a class from EventArgs from which you can specify whatever values you want to pass. Events allow you to register delegates which are held in some-what of a linked-list fashion which are then invoked when the event fires. There are several good articles available, some which are on CP (check out Chris Sell's article: .NET Delegates: A C# Bedtime Story[^]). Hope this is of some help. Here is just one example of how delegates and events work together:

using System;
using System.Windows.Forms;

namespace Test
{
	class Class1 : System.Windows.Forms.Form
	{
		public Class1(){}

		public delegate void MyEventHandler(int i);
		public event MyEventHandler MyEvent;

		static void Main(string[] args)
		{
			Class1 cls = new Class1();
			cls.MyEvent += new MyEventHandler(SomeMethod);
			cls.MyEvent += new MyEventHandler(AnotherMethod);

			if(cls.MyEvent != null)
				cls.MyEvent(6);

			cls.ShowDialog();
		}

		public static void SomeMethod(int i)
		{
			MessageBox.Show("Hello from SomeMethod. " +
				            i + " was passed in.");
		}

		public static void AnotherMethod(int i)
		{
			MessageBox.Show("Hello from AnotherMethod. " +
				i + " was passed in.");
		}
	}
}


-Nick Parker
DeveloperNotes.com


GeneralRe: Passing Data between forms Pin
Jeff Patterson2-Dec-03 16:06
Jeff Patterson2-Dec-03 16:06 
GeneralWierd IO Pin
Tatham1-Dec-03 16:33
Tatham1-Dec-03 16:33 
GeneralRe: Wierd IO Pin
Heath Stewart1-Dec-03 18:47
protectorHeath Stewart1-Dec-03 18:47 
GeneralPassing in Function name to be called Pin
obelisk291-Dec-03 15:38
obelisk291-Dec-03 15:38 
GeneralRe: Passing in Function name to be called Pin
azusakt1-Dec-03 15:59
azusakt1-Dec-03 15:59 
GeneralRe: Passing in Function name to be called Pin
Nick Parker1-Dec-03 17:32
protectorNick Parker1-Dec-03 17:32 
GeneralRe: Passing in Function name to be called Pin
Corinna John1-Dec-03 19:12
Corinna John1-Dec-03 19:12 
GeneralDrawing routed lines Pin
Member 961-Dec-03 14:13
Member 961-Dec-03 14:13 
QuestionUse for attributes in C#? Pin
JoeRocket1-Dec-03 13:31
JoeRocket1-Dec-03 13:31 
AnswerRe: Use for attributes in C#? Pin
Colin Angus Mackay1-Dec-03 13:59
Colin Angus Mackay1-Dec-03 13:59 
GeneralManaged DirectSound resources Pin
Oyvind Bratland1-Dec-03 8:56
Oyvind Bratland1-Dec-03 8:56 
GeneralRe: Managed DirectSound resources Pin
Heath Stewart1-Dec-03 11:00
protectorHeath Stewart1-Dec-03 11:00 
GeneralRe: Managed DirectSound resources Pin
Oyvind Bratland1-Dec-03 21:07
Oyvind Bratland1-Dec-03 21:07 
GeneralRe: Managed DirectSound resources Pin
Heath Stewart2-Dec-03 2:51
protectorHeath Stewart2-Dec-03 2:51 
GeneralRe: Managed DirectSound resources Pin
Oyvind Bratland2-Dec-03 20:46
Oyvind Bratland2-Dec-03 20:46 
Generalimplementing IList for a sortedlist Pin
zuhx1-Dec-03 6:11
zuhx1-Dec-03 6:11 
GeneralRe: implementing IList for a sortedlist Pin
Heath Stewart1-Dec-03 6:41
protectorHeath Stewart1-Dec-03 6:41 

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

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