Click here to Skip to main content
15,884,298 members
Home / Discussions / C#
   

C#

 
AnswerRe: xmlDocument Pin
Mirko198012-Oct-09 23:56
Mirko198012-Oct-09 23:56 
Questionprinting 2 document to same file/ preview Pin
samy10012-Oct-09 23:39
samy10012-Oct-09 23:39 
AnswerRe: printing 2 document to same file/ preview Pin
Henry Minute13-Oct-09 1:35
Henry Minute13-Oct-09 1:35 
GeneralRe: printing 2 document to same file/ preview Pin
samy10013-Oct-09 2:12
samy10013-Oct-09 2:12 
GeneralRe: printing 2 document to same file/ preview Pin
Henry Minute13-Oct-09 3:04
Henry Minute13-Oct-09 3:04 
Questionchange scrollbar maxvalue in treeview Pin
Deabdy2112-Oct-09 23:19
Deabdy2112-Oct-09 23:19 
AnswerRe: change scrollbar maxvalue in treeview Pin
Calla13-Oct-09 0:05
Calla13-Oct-09 0:05 
Questionwhat is ObjectSender and EventArgs in Windows Form Pin
ldsdbomber12-Oct-09 23:07
ldsdbomber12-Oct-09 23:07 
In a simple dialog

namespace projectname
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void Form1_Load(object sender, EventArgs e)
{

}

private void FormDataChanged(object sender, EventArgs e)
{
blah.........
}

private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
{

FormDataChanged(???????????, ?????????);
}

}
}

If I want to use the FormDataChanged function when I process the change in a listbox or a checkbox or whatever, what should I supply as the arguments. I suppose I have just dived in to C# and it's a bit different to what I am used to. I am not using either "sender" or "e" in the FormDataChanged function, I just want to know what is/should be in there, is it the item on the form itself that is the object, e.g. in the example above, is it the listbox itself, should it be "this" as the 1st parameter, and where does its EventArgs come from?

thanks for any help

If I put FormDataChanged(sender, e) that seems like it should be correct, but maybe I just need to find out a bit more about how the sender/args constructs work in more detail
AnswerRe: what is ObjectSender and EventArgs in Windows Form Pin
Mirko198013-Oct-09 0:05
Mirko198013-Oct-09 0:05 
AnswerRe: what is ObjectSender and EventArgs in Windows Form Pin
Luc Pattyn13-Oct-09 3:03
sitebuilderLuc Pattyn13-Oct-09 3:03 
GeneralRe: what is ObjectSender and EventArgs in Windows Form Pin
ldsdbomber13-Oct-09 3:49
ldsdbomber13-Oct-09 3:49 
GeneralRe: what is ObjectSender and EventArgs in Windows Form Pin
Luc Pattyn13-Oct-09 4:11
sitebuilderLuc Pattyn13-Oct-09 4:11 
GeneralRe: what is ObjectSender and EventArgs in Windows Form Pin
ldsdbomber13-Oct-09 4:34
ldsdbomber13-Oct-09 4:34 
GeneralRe: what is ObjectSender and EventArgs in Windows Form Pin
Luc Pattyn13-Oct-09 4:44
sitebuilderLuc Pattyn13-Oct-09 4:44 
QuestionWMP Pin
Yonathan111112-Oct-09 22:53
professionalYonathan111112-Oct-09 22:53 
AnswerRe: WMP Pin
Lyon Sun13-Oct-09 2:15
Lyon Sun13-Oct-09 2:15 
QuestionRe: WMP Pin
Yonathan111114-Oct-09 3:32
professionalYonathan111114-Oct-09 3:32 
AnswerRe: WMP Pin
Lyon Sun14-Oct-09 10:52
Lyon Sun14-Oct-09 10:52 
GeneralRe: WMP Pin
Yonathan111114-Oct-09 20:09
professionalYonathan111114-Oct-09 20:09 
GeneralRe: WMP Pin
Lyon Sun14-Oct-09 20:45
Lyon Sun14-Oct-09 20:45 
QuestionApplication Freeze after ScreenSaver/Workstation Lock/Display Change Pin
musefan12-Oct-09 22:10
musefan12-Oct-09 22:10 
AnswerRe: Application Freeze after ScreenSaver/Workstation Lock/Display Change Pin
benjymous12-Oct-09 22:26
benjymous12-Oct-09 22:26 
GeneralRe: Application Freeze after ScreenSaver/Workstation Lock/Display Change Pin
musefan12-Oct-09 22:57
musefan12-Oct-09 22:57 
AnswerRe: Application Freeze after ScreenSaver/Workstation Lock/Display Change Pin
Mirko198012-Oct-09 22:44
Mirko198012-Oct-09 22:44 
GeneralRe: Application Freeze after ScreenSaver/Workstation Lock/Display Change Pin
musefan12-Oct-09 23:01
musefan12-Oct-09 23:01 

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.