Click here to Skip to main content
15,898,679 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: How to call a method on another form Pin
KlaasVersteeg13-Apr-10 2:25
KlaasVersteeg13-Apr-10 2:25 
Questionobject to string (with 15 digit precision if decimal) [modified] Pin
T21028-Apr-10 4:49
T21028-Apr-10 4:49 
AnswerRe: object to string (with 15 digit precision if decimal) Pin
Andreoli Carlo13-Apr-10 0:39
professionalAndreoli Carlo13-Apr-10 0:39 
QuestionInvoking Event Handlers Programmatically? Pin
TheBerk7-Apr-10 11:18
TheBerk7-Apr-10 11:18 
AnswerRe: Invoking Event Handlers Programmatically? Pin
Andreoli Carlo7-Apr-10 23:04
professionalAndreoli Carlo7-Apr-10 23:04 
GeneralRe: Invoking Event Handlers Programmatically? Pin
TheBerk8-Apr-10 3:55
TheBerk8-Apr-10 3:55 
GeneralRe: Invoking Event Handlers Programmatically? Pin
Andreoli Carlo8-Apr-10 20:54
professionalAndreoli Carlo8-Apr-10 20:54 
AnswerRe: Invoking Event Handlers Programmatically? Pin
Luc Pattyn8-Apr-10 4:52
sitebuilderLuc Pattyn8-Apr-10 4:52 
Hi,

IMO you should not attempt to call an event handler explicitly; one reason is you would have to provide fake parameters, sender wouldn't be a problem, the particular EventArgs may prove more difficult to fake. Unless of course you're absolutely sure the handler doesn't (and never will) use its parameters.

There are two alternatives I would recommend:
1. some events can be triggered by calling an appropriate method, e.g. Button.PerformClick().
2. when the functionality of an event handler is also useful outside the normel event handling, refactor it into a separate method, call that from the event handler, and from anywhere else you'd like to call it.

Smile | :)

GeneralRe: Invoking Event Handlers Programmatically? Pin
TheBerk8-Apr-10 5:05
TheBerk8-Apr-10 5:05 
GeneralRe: Invoking Event Handlers Programmatically? Pin
Luc Pattyn8-Apr-10 5:15
sitebuilderLuc Pattyn8-Apr-10 5:15 
QuestionHow to unload mixed-mode MFC assembly loaded in AppDomain Pin
catrill5-Apr-10 17:31
catrill5-Apr-10 17:31 
Questionunable to call function in CLI/C++ dll from native C++, when linked Explicitly Pin
Cherry_manju4-Apr-10 23:51
Cherry_manju4-Apr-10 23:51 
AnswerRe: unable to call function in CLI/C++ dll from native C++, when linked Explicitly Pin
N a v a n e e t h5-Apr-10 15:44
N a v a n e e t h5-Apr-10 15:44 
Questionglobal access to objects / instances Pin
KlaasVersteeg31-Mar-10 2:31
KlaasVersteeg31-Mar-10 2:31 
AnswerRe: global access to objects / instances Pin
Richard MacCutchan31-Mar-10 2:46
mveRichard MacCutchan31-Mar-10 2:46 
GeneralRe: global access to objects / instances Pin
KlaasVersteeg31-Mar-10 2:59
KlaasVersteeg31-Mar-10 2:59 
GeneralRe: global access to objects / instances Pin
Richard MacCutchan31-Mar-10 3:07
mveRichard MacCutchan31-Mar-10 3:07 
GeneralRe: global access to objects / instances Pin
KlaasVersteeg31-Mar-10 3:25
KlaasVersteeg31-Mar-10 3:25 
GeneralRe: global access to objects / instances Pin
Richard MacCutchan31-Mar-10 3:46
mveRichard MacCutchan31-Mar-10 3:46 
GeneralRe: global access to objects / instances Pin
KlaasVersteeg31-Mar-10 3:53
KlaasVersteeg31-Mar-10 3:53 
GeneralRe: global access to objects / instances Pin
Richard MacCutchan31-Mar-10 4:25
mveRichard MacCutchan31-Mar-10 4:25 
GeneralRe: global access to objects / instances Pin
KlaasVersteeg31-Mar-10 4:37
KlaasVersteeg31-Mar-10 4:37 
GeneralRe: global access to objects / instances Pin
Richard MacCutchan31-Mar-10 5:53
mveRichard MacCutchan31-Mar-10 5:53 
GeneralRe: global access to objects / instances Pin
KlaasVersteeg31-Mar-10 6:39
KlaasVersteeg31-Mar-10 6:39 
GeneralRe: global access to objects / instances Pin
Richard MacCutchan31-Mar-10 7:12
mveRichard MacCutchan31-Mar-10 7:12 

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.