Click here to Skip to main content
15,889,992 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to reuse event Pin
Member 1034709216-Apr-14 1:08
Member 1034709216-Apr-14 1:08 
GeneralRe: How to reuse event Pin
Dave Kreskowiak16-Apr-14 1:27
mveDave Kreskowiak16-Apr-14 1:27 
GeneralRe: How to reuse event Pin
Member 1034709216-Apr-14 4:21
Member 1034709216-Apr-14 4:21 
QuestionC# use all controls on different form Pin
t..bdiesel14-Apr-14 2:35
t..bdiesel14-Apr-14 2:35 
AnswerRe: C# use all controls on different form Pin
joost.versteegen14-Apr-14 20:42
joost.versteegen14-Apr-14 20:42 
GeneralRe: C# use all controls on different form Pin
t..bdiesel15-Apr-14 3:56
t..bdiesel15-Apr-14 3:56 
GeneralRe: C# use all controls on different form Pin
t..bdiesel15-Apr-14 4:02
t..bdiesel15-Apr-14 4:02 
GeneralRe: C# use all controls on different form Pin
joost.versteegen15-Apr-14 4:48
joost.versteegen15-Apr-14 4:48 
You could pass data using your own eventhandler!
C#
public partial class Form1 : Form
{
  public delegate void FooHandler(int myParam1, string myParam2);
  public static FooHandler fooHandler;

  public Form1()
  {
    InitializeComponent();
    fooHandler = foo;

    Form2 f = new Form2();
    f.Show();
  }

  public void foo(int myParam1, string myParam2)
  {
    MessageBox.Show(string.Format("foo {0},{1}", myParam1, myParam2));
    this.Text = "I was foo-ed";
  }
}
public partial class Form2 : Form
{
  public Form2()
  {
    InitializeComponent();
    this.button1.Click += new EventHandler(button1_Click);
  }

  private void button1_Click(object sender, EventArgs e)
  {
    if (Form1.fooHandler != null) Form1.fooHandler(2, "foo-you!");
  }
}

GeneralRe: C# use all controls on different form Pin
t..bdiesel15-Apr-14 21:20
t..bdiesel15-Apr-14 21:20 
QuestionCrystal Report 2008 export to text problem Pin
Member 1073816613-Apr-14 22:10
Member 1073816613-Apr-14 22:10 
AnswerRe: Crystal Report 2008 export to text problem Pin
Maciej Los13-Apr-14 23:08
mveMaciej Los13-Apr-14 23:08 
GeneralRe: Crystal Report 2008 export to text problem Pin
Member 1073816615-Apr-14 1:01
Member 1073816615-Apr-14 1:01 
GeneralRe: Crystal Report 2008 export to text problem Pin
Maciej Los23-Apr-14 1:18
mveMaciej Los23-Apr-14 1:18 
Questionhow to solve- when windows forms application exe run from program files then it getting very slow Pin
Member 1029340813-Apr-14 20:47
professionalMember 1029340813-Apr-14 20:47 
AnswerRe: how to solve- when windows forms application exe run from program files then it getting very slow Pin
Sivaraman Dhamodharan13-Apr-14 20:56
Sivaraman Dhamodharan13-Apr-14 20:56 
GeneralRe: how to solve- when windows forms application exe run from program files then it getting very slow Pin
Member 1029340813-Apr-14 23:38
professionalMember 1029340813-Apr-14 23:38 
GeneralRe: how to solve- when windows forms application exe run from program files then it getting very slow Pin
Sivaraman Dhamodharan14-Apr-14 2:41
Sivaraman Dhamodharan14-Apr-14 2:41 
AnswerRe: how to solve- when windows forms application exe run from program files then it getting very slow Pin
Richard MacCutchan13-Apr-14 22:04
mveRichard MacCutchan13-Apr-14 22:04 
AnswerRe: how to solve- when windows forms application exe run from program files then it getting very slow Pin
Dave Kreskowiak14-Apr-14 1:23
mveDave Kreskowiak14-Apr-14 1:23 
QuestionWhy is it allowed to create public constructor of an abstract class in C# ? Pin
Varun Thakur13-Apr-14 18:54
Varun Thakur13-Apr-14 18:54 
AnswerRe: Why is it allowed to create public constructor of an abstract class in C# ? Pin
OriginalGriff13-Apr-14 22:02
mveOriginalGriff13-Apr-14 22:02 
AnswerRe: Why is it allowed to create public constructor of an abstract class in C# ? Pin
Eddy Vluggen13-Apr-14 22:32
professionalEddy Vluggen13-Apr-14 22:32 
QuestionClear a tab contents when i switch tabs Pin
alfie.max1513-Apr-14 5:29
alfie.max1513-Apr-14 5:29 
AnswerRe: Clear a tab contents when i switch tabs Pin
Jay Nardev13-Apr-14 7:19
Jay Nardev13-Apr-14 7:19 
GeneralRe: Clear a tab contents when i switch tabs Pin
alfie.max1513-Apr-14 9:30
alfie.max1513-Apr-14 9:30 

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.