Click here to Skip to main content
15,919,479 members
Home / Discussions / C#
   

C#

 
GeneralRe: XML Parsing Pin
Christian Wikander13-Mar-05 22:19
Christian Wikander13-Mar-05 22:19 
GeneralParsing XML Pin
Anonymous13-Mar-05 21:45
Anonymous13-Mar-05 21:45 
GeneralI like convert Icon to String Pin
VictorVB13-Mar-05 20:56
VictorVB13-Mar-05 20:56 
GeneralRe: I like convert Icon to String Pin
J4amieC13-Mar-05 22:24
J4amieC13-Mar-05 22:24 
GeneralRe: I like convert Icon to String Pin
VictorVB13-Mar-05 23:50
VictorVB13-Mar-05 23:50 
GeneralRe: I like convert Icon to String Pin
J4amieC14-Mar-05 0:57
J4amieC14-Mar-05 0:57 
Generalbypassing the button event Pin
maheshfour13-Mar-05 20:11
maheshfour13-Mar-05 20:11 
GeneralRe: bypassing the button event Pin
Christian Wikander13-Mar-05 21:26
Christian Wikander13-Mar-05 21:26 
You can attach and detach the eventhandler. If you look at the "Windows Form Designer generated code" you can see how the connection between the event and the code is done.
If the code that should be triggered by the event is in button1_Click the code would be as follows:

private void AttachEventHandler()
{
this.button1.Click += new System.EventHandler(button1_Click);
}

private void DetachEventHandler()
{
this.button1.Click -= new System.EventHandler(button1_Click);
}

But why don't you just check the conditions using an if statement in the event code?
GeneralRe: bypassing the button event Pin
ameto13-Mar-05 23:37
ameto13-Mar-05 23:37 
GeneralRe: bypassing the button event Pin
Christian Wikander13-Mar-05 23:46
Christian Wikander13-Mar-05 23:46 
GeneralRe: bypassing the button event Pin
maheshfour14-Mar-05 0:05
maheshfour14-Mar-05 0:05 
GeneralRe: bypassing the button event Pin
mav.northwind14-Mar-05 0:17
mav.northwind14-Mar-05 0:17 
GeneralRe: bypassing the button event Pin
maheshfour14-Mar-05 0:28
maheshfour14-Mar-05 0:28 
GeneralRe: bypassing the button event Pin
mav.northwind14-Mar-05 0:53
mav.northwind14-Mar-05 0:53 
GeneralRe: bypassing the button event Pin
Pushkar Pathak15-Mar-05 19:22
Pushkar Pathak15-Mar-05 19:22 
GeneralRe: bypassing the button event Pin
Pushkar Pathak15-Mar-05 19:14
Pushkar Pathak15-Mar-05 19:14 
QuestionHow can I embed my application to .NET environment? Pin
Anonymous13-Mar-05 20:09
Anonymous13-Mar-05 20:09 
Generalbypassing the button evet Pin
maheshfour13-Mar-05 20:09
maheshfour13-Mar-05 20:09 
GeneralDelete multi row in datagrid Pin
joy_priyank13-Mar-05 19:18
joy_priyank13-Mar-05 19:18 
GeneralRe: Delete multi row in datagrid Pin
J4amieC13-Mar-05 22:29
J4amieC13-Mar-05 22:29 
GeneralRe: Delete multi row in datagrid Pin
joy_priyank13-Mar-05 23:36
joy_priyank13-Mar-05 23:36 
Generalcurve fitting Pin
bwagz13-Mar-05 13:05
bwagz13-Mar-05 13:05 
GeneralRe: curve fitting Pin
Sean Cundiff13-Mar-05 14:02
Sean Cundiff13-Mar-05 14:02 
GeneralA RichTextBox-related question Pin
Ratty_oTO13-Mar-05 12:49
Ratty_oTO13-Mar-05 12:49 
GeneralDataGrid Pin
Bahadir Cambel13-Mar-05 10:52
Bahadir Cambel13-Mar-05 10:52 

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.