Click here to Skip to main content
15,916,702 members
Home / Discussions / C#
   

C#

 
QuestionCommand for EchoOff & EchoOn in C#...? Pin
IamHuM11-Nov-06 0:53
IamHuM11-Nov-06 0:53 
AnswerRe: Command for EchoOff & EchoOn in C#...? Pin
sj_h111-Nov-06 4:16
sj_h111-Nov-06 4:16 
QuestionUnmanaged exceptions in managed code Pin
Daniel_at_Scania10-Nov-06 23:01
Daniel_at_Scania10-Nov-06 23:01 
AnswerRe: Unmanaged exceptions in managed code Pin
mav.northwind11-Nov-06 20:47
mav.northwind11-Nov-06 20:47 
QuestionHelp: Running error while invoking unmanaged code Pin
mtk00810-Nov-06 16:27
mtk00810-Nov-06 16:27 
AnswerRe: Help: Running error while invoking unmanaged code Pin
mav.northwind10-Nov-06 19:34
mav.northwind10-Nov-06 19:34 
GeneralRe: Help: Running error while invoking unmanaged code Pin
mtk00810-Nov-06 20:26
mtk00810-Nov-06 20:26 
QuestionEvent of dynamically created control problem - please help Pin
Kasic Slobodan10-Nov-06 15:42
Kasic Slobodan10-Nov-06 15:42 
Iam adding controls onto win form with this code:

Name, position, path and order, Iam reading from XML. That's OK.
name = lng.node.Current.GetAttribute("Namespace", "");

position = lng.node.Current.GetAttribute("Position", "");

path = GetModulePath(int.Parse(lng.node.Current.GetAttribute("BoundToID", "").ToString()));

order = lng.node.Current.GetAttribute("Order", "");

ass = Assembly.LoadFile(Application.StartupPath + "\\" + path);
t = ass.GetType(name);
o = Activator.CreateInstance(t);

uc = ( (UserControl)(o) );


I have module class that is a based class for module, and every control that has to behave like module have to be inherited from this class.
I have implemented collapse/expand option in module class and adding this button is handeled in module class, so when I inherit from module class, that control gets its own collapse/expand button.

I want to raise an event when I click on that collapse/expand button, but to catch the event in main form where Iam loading this modules, so I need a code how to create event handler with dymanically created events.

Normaly, I will do like so:

this.someModule.ClickedCollapseExpandButtonEvent += ClickedCollapseExpandButtonHandler(someModule_ClickedCollapseExpandButtonEvent);


And then
private void someModule_ClickedCollapseExpandButtonEvent(object sender, EventArgs e)
{
    // Do the stuff
}


I hope you've understood.
AnswerRe: Event of dynamically created control problem - please help Pin
Guffa10-Nov-06 15:50
Guffa10-Nov-06 15:50 
QuestionRe: Event of dynamically created control problem - please help Pin
Kasic Slobodan11-Nov-06 2:44
Kasic Slobodan11-Nov-06 2:44 
AnswerRe: Event of dynamically created control problem - please help Pin
Guffa11-Nov-06 6:22
Guffa11-Nov-06 6:22 
QuestionRe: Event of dynamically created control problem - please help [modified] Pin
Kasic Slobodan11-Nov-06 16:04
Kasic Slobodan11-Nov-06 16:04 
QuestionRe: Event of dynamically created control problem - please help Pin
Kasic Slobodan16-Nov-06 15:34
Kasic Slobodan16-Nov-06 15:34 
AnswerRe: Event of dynamically created control problem - please help Pin
Kasic Slobodan19-Nov-06 8:03
Kasic Slobodan19-Nov-06 8:03 
QuestionHOOK YahooMessenger Pin
cuongcntt200210-Nov-06 14:18
cuongcntt200210-Nov-06 14:18 
AnswerRe: HOOK YahooMessenger Pin
aamironline10-Nov-06 15:58
aamironline10-Nov-06 15:58 
QuestionProblem with Connect to SqlServer 2000 From Client Pin
hdv21210-Nov-06 13:08
hdv21210-Nov-06 13:08 
AnswerRe: Problem with Connect to SqlServer 2000 From Client Pin
Guffa10-Nov-06 15:53
Guffa10-Nov-06 15:53 
QuestionWeb Service receiving parameters Pin
fjbotto10-Nov-06 9:09
fjbotto10-Nov-06 9:09 
AnswerRe: Web Service receiving parameters Pin
aamironline10-Nov-06 16:01
aamironline10-Nov-06 16:01 
Questionhow to pass parameter to CrystalReports ? Pin
hdv21210-Nov-06 8:00
hdv21210-Nov-06 8:00 
AnswerRe: how to pass parameter to CrystalReports ? Pin
ednrgc10-Nov-06 8:44
ednrgc10-Nov-06 8:44 
AnswerRe: how to pass parameter to CrystalReports ? Pin
aPerfectCircle10-Nov-06 11:07
aPerfectCircle10-Nov-06 11:07 
Questionrun exe on different computer Pin
aPerfectCircle10-Nov-06 7:59
aPerfectCircle10-Nov-06 7:59 
AnswerRe: run exe on different computer Pin
ednrgc10-Nov-06 8:35
ednrgc10-Nov-06 8:35 

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.