Which of the controls in .net dont have events?

Posted by Karthikanbarasan under Interview Questions on 1/19/2011 | Points: 10 | Views : 1964 | Status : [Member] [Moderator] [Microsoft_MVP] [MVP] | Replies : 5
Which of the controls in .net dont have events in .net framework

Thanks
Karthik
www.f5Debug.net



Responses

Posted by: T.saravanan on: 1/20/2011 [Member] [MVP] Silver | Points: 25

Up
0
Down
Hi Karthik,

Nice question.I search in Visual Studio Toolbox i find out some controls.
In Winforms DirectoryEntry,DirectorySearcher & PerformanceCounter controls are don't have the other events.But those have the disposed events.
For uses of those controls reefer this links..
http://social.msdn.microsoft.com/Forums/eu/sharepointdevelopment/thread/3a15a191-3115-4070-90ba-719c7020eae8
http://www.codeproject.com/KB/system/everythingInAD.aspx
http://www.c-sharpcorner.com/UploadFile/puranindia/333/Default.aspx

Otherwise all the controls have the events based on the controls in winforms and webforms.

Cheers :)

Thanks,
T.Saravanan

Karthikanbarasan, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Karthikanbarasan on: 1/20/2011 [Member] [Moderator] [Microsoft_MVP] [MVP] Silver | Points: 25

Up
0
Down
Thanks Saravanan... Let me check

Thanks
Karthik
www.f5Debug.net

Karthikanbarasan, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Karthikanbarasan on: 1/27/2011 [Member] [Moderator] [Microsoft_MVP] [MVP] Silver | Points: 25

Up
0
Down
Saravanan,

Apart from these Winforms DirectoryEntry,DirectorySearcher & PerformanceCounter controls

I can see shapes, timer etc are mentioned event less... But im not sure how timer is event less... any idea on this ?

Thanks
Karthik
www.f5Debug.net

Karthikanbarasan, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: T.saravanan on: 1/27/2011 [Member] [MVP] Silver | Points: 25

Up
0
Down
Hi Karthik,

Based on the Controls,Microsoft(Visual Studio Developers) given the events.
Normally what is the main purpose of Timer....Just check the Start and End Time.So he given only the Tick event.
Its only used for start and stop the timer.If you start the timer from any event (or) method at the time tick event will fire and do its work.If you stop the timer means automatically tick event comes to rest stage.Mainly we have use the timer control for ProgressBar control.

Here i am using a Ticker control for increase a ProgressBar value....
Just drag and drop the Ticker and ProgressBar control in your form.
In Timer Control set the interval property is '2000'  // 2000 means 2 sec.

In ProgressBar set Minimum is 2000 and Maximum is 3000.

//Declare the following object...
int nInterval = 100;

//In your form constructor start the timer.
timer1.Start();

//In Tick event...
private void timer1_Tick(object sender, EventArgs e)
{
if(timer1.Interval <= progressBar1.Maximum)
{
progressBar1.Value = timer1.Interval;
timer1.Interval += nInterval;
}
else
{
timer1.Stop();
}
}


more about Timer uses...http://www.codeproject.com/KB/dotnet/multithread.aspx
http://social.msdn.microsoft.com/Forums/en-US/winforms/thread/43daf8b2-67ad-4938-98f7-cae3eaa5e63f

Cheers :)


Thanks,
T.Saravanan

Karthikanbarasan, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Karthikanbarasan on: 1/27/2011 [Member] [Moderator] [Microsoft_MVP] [MVP] Silver | Points: 25

Up
0
Down
thanks... let me check this

Thanks
Karthik
www.f5Debug.net

Karthikanbarasan, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response