Click here to Skip to main content
15,887,214 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# Task Faulted Problem Pin
Kevin Marois13-Apr-17 5:34
professionalKevin Marois13-Apr-17 5:34 
QuestionXML inputs to telnet console in c# Pin
nikhil201510-Apr-17 2:47
nikhil201510-Apr-17 2:47 
QuestionRe: XML inputs to telnet console in c# Pin
Richard MacCutchan10-Apr-17 2:53
mveRichard MacCutchan10-Apr-17 2:53 
AnswerRe: XML inputs to telnet console in c# Pin
Pete O'Hanlon10-Apr-17 2:55
mvePete O'Hanlon10-Apr-17 2:55 
Questionc# Events Redirection in Designer.cs and Visual Studio 2017 More Problems. Pin
zequion7-Apr-17 20:57
professionalzequion7-Apr-17 20:57 
AnswerRe: c# Events Redirection in Designer.cs and Visual Studio 2017 More Problems. Pin
Richard MacCutchan7-Apr-17 21:33
mveRichard MacCutchan7-Apr-17 21:33 
AnswerRe: c# Events Redirection in Designer.cs and Visual Studio 2017 More Problems. Pin
Gerry Schmitz9-Apr-17 8:56
mveGerry Schmitz9-Apr-17 8:56 
AnswerRe: c# Events Redirection in Designer.cs and Visual Studio 2017 More Problems. Pin
BillWoodruff11-Apr-17 3:51
professionalBillWoodruff11-Apr-17 3:51 
I think you do have a valid technical question here, but you need to state what it is more clearly; going on about the speed of VS is not going to get you to a solution.

A way I handle event triggers across Forms is something like this:

1. Define an Action public field in the Form you want to raise an Event, but have the Event handled in another Form:
C#
// 'FormWithBtn ... in the Form with the Button
public Action<Button> BtnAction = null;
1.a. define the Button's Click EventHandler, and modify it to invoke the BtnAction:
C#
private void SomeButton_Click(object sender, EventArgs e)
{
   if(BtnAction != null) BtnAction(sender as Button);
}
2. in the Form that creates the instance of 'FormWithBtn ... for example, the Main Form
C#
private FormWithButton FWBInstance = new FormWithButton();

private void Form1_Load(object sender, EventArgs e)
{ 
    FWBInstance.BtnAction = FWBButtonHandler;
} 

private void FWBButtonHandler(Button btn)
{
    // do whatever
}
This "model" of creating Event handling across Forms uses "injection" of an Action (a form of delegate), and it avoids dependency creation between the two contexts (Forms) ... imho, a good thing.

Hope this helps.
«When I consider my brief span of life, swallowed up in an eternity before and after, the little space I fill, and even can see, engulfed in the infinite immensity of spaces of which I am ignorant, and which know me not, I am frightened, and am astonished at being here rather than there; for there is no reason why here rather than there, now rather than then.» Blaise Pascal

AnswerRe: c# Events Redirection in Designer.cs and Visual Studio 2017 More Problems. Pin
Pete O'Hanlon11-Apr-17 4:13
mvePete O'Hanlon11-Apr-17 4:13 
QuestionError shortcut Pin
mahdiiiiyeh7-Apr-17 19:22
mahdiiiiyeh7-Apr-17 19:22 
QuestionRe: Error shortcut Pin
Richard MacCutchan7-Apr-17 21:31
mveRichard MacCutchan7-Apr-17 21:31 
AnswerRe: Error shortcut Pin
mahdiiiiyeh8-Apr-17 0:27
mahdiiiiyeh8-Apr-17 0:27 
GeneralRe: Error shortcut Pin
Richard MacCutchan8-Apr-17 0:30
mveRichard MacCutchan8-Apr-17 0:30 
AnswerRe: Error shortcut Pin
OriginalGriff7-Apr-17 21:33
mveOriginalGriff7-Apr-17 21:33 
GeneralRe: Error shortcut Pin
mahdiiiiyeh8-Apr-17 0:21
mahdiiiiyeh8-Apr-17 0:21 
GeneralRe: Error shortcut Pin
OriginalGriff8-Apr-17 0:52
mveOriginalGriff8-Apr-17 0:52 
GeneralRe: Error shortcut Pin
mahdiiiiyeh8-Apr-17 2:09
mahdiiiiyeh8-Apr-17 2:09 
GeneralRe: Error shortcut Pin
OriginalGriff8-Apr-17 2:18
mveOriginalGriff8-Apr-17 2:18 
Questionusing k means heart diseases prediction system Pin
Member 131132397-Apr-17 5:56
Member 131132397-Apr-17 5:56 
AnswerRe: using k means heart diseases prediction system Pin
OriginalGriff7-Apr-17 6:00
mveOriginalGriff7-Apr-17 6:00 
AnswerRe: using k means heart diseases prediction system Pin
Dave Kreskowiak7-Apr-17 8:23
mveDave Kreskowiak7-Apr-17 8:23 
GeneralRe: using k means heart diseases prediction system Pin
harold aptroot7-Apr-17 11:04
harold aptroot7-Apr-17 11:04 
QuestionTask Question Pin
Kevin Marois6-Apr-17 8:08
professionalKevin Marois6-Apr-17 8:08 
AnswerRe: Task Question Pin
Pete O'Hanlon6-Apr-17 8:59
mvePete O'Hanlon6-Apr-17 8:59 
GeneralRe: Task Question Pin
Kevin Marois6-Apr-17 9:07
professionalKevin Marois6-Apr-17 9:07 

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.