InitializeComponent method [Archive] - C Board

PDA

View Full Version : InitializeComponent method


George2
04-14-2008, 04:03 AM
Hello everyone,


To implement a service, I think we just need to derived from ServiceBase class, and implement some event handler function, like OnStart, OnStop, etc.

As described in the sample,

http://msdn2.microsoft.com/en-us/library/system.serviceprocess.servicebase(VS.80).aspx

What is the function of method InitializeComponent? I found it never called explicitly in the class SimpleService, nor there are any document from MSDN about this method. Any ideas?


thanks in advance,
George

Magos
04-14-2008, 08:14 AM
If it's anything like a windows forms application that function is initializing the form and its controls, basically calls some code to make buttons, textboxes etc... to appear in the form.

George2
04-15-2008, 07:40 AM
Thanks Magos,


Your answer is clear. :-)

If it's anything like a windows forms application that function is initializing the form and its controls, basically calls some code to make buttons, textboxes etc... to appear in the form.


regards,
George