.Net Interview Questions and Answers

Search:

.Net Interview Question:- Adding your window application icon to the task bar ?

By : Shiv Prasad Koirala | Aug 21st, 2011 | Views : 174 | Comments : 0 Bookmark and Share

.Net Interview Question:- Adding  your window application icon to the task bar?

This is not one of the .NET typical interview question but as a developer you would be interested in knowing that how to add your windows application icon in to the task bar.

Let’s demonstrate a simple example to see how exactly you can add your windows application icon in the task bar.

In order to achieve the above subject just follow the following steps.

Step1: - create a windows application for that Go To > File > New > Project > Windows > Select Windows Forms Application.



Step2: - Now from the toolbox just add the “NotifyIcon” control to the main form.



Step3: - Go to the properties of the NotifyIcon control and set the properties like below diagram.



In the above diagram you can see that I have set the following properties.

BalloonTipIcon = Warning.

BalloonTipText = Click to enlarge.

BalloonTipTitle = Message.

Note: - please select an icon with .ico extension with maximum size of 48 * 48.

Step4: - Add a Button on the form and add the below code snippet in to Form1.cs.

private void button1_Click(object sender, EventArgs e){notifyIcon1.ShowBalloonTip(1);this.Visible = false;}

Once you have completed with all the above steps now just run your application and will see that the selected application icon is now being added to the task bar to the right bottom of your screen like below diagram.



In above diagram you can clearly see that now the application icon is being added to the task bar.

Now, when you click on the Button1 you will see a message pops up like below diagram as we have declared to the properties of the NotifyIcon control.



 

Also view our video ofC# interview questions on Garbage Collector as follows: -





Visit us for more tutorials on.Net Interview Question

Regards,

Get more.Net / C# interview questions  from author’s blog



 

 
Rate this Article :
1 Star
2 Stars
3 Stars
4 Stars
5 Stars
0 1 1 2 1
 
Article Tags : Net Interview Question , Net
 
Comments

Write a Comment

All fields marked with * are mandatory

9fcf9

 

 

ASP.NET interview questions: - Can you explain Method of Sorting GridViewcontrol in ASP.NET?

Sorting allow you to sort the GridViewcontrol data in Ascending or Descending order.... Read More

WCF Interview questions:- Which binding do we need to use for WCF REST?

In this article we will show Binding used for WCF REST. For more articles and videos visit us on www.questpond.com... Read More

.NET interview questions: - Can you elaborate project life cycle?

In this article we will explain about project life cycle. For more articles and videos visit us on http://www.questpond.com/... Read More

.NET interview questions: - How will you distinguish between ForeGround and BackGround Threading?

threading is a parallel processing unit and helps you to access multiple tasks at a one moment of time.... Read More

C# interview questions: - Explain anonymous methods in .NET?

n simple words Anonymous Methods means method which are coded inline or methods without method name.... Read More

ASP.NET interview questions: - Can you explain Method of Sorting GridViewcontrol in ASP.NET?

Sorting allow you to sort the GridViewcontrol data in Ascending or Descending order.... Read More

WCF Interview questions:- Which binding do we need to use for WCF REST?

In this article we will show Binding used for WCF REST. For more articles and videos visit us on www.questpond.com... Read More

.NET interview questions: - Can you elaborate project life cycle?

In this article we will explain about project life cycle. For more articles and videos visit us on http://www.questpond.com/... Read More

.NET interview questions: - How will you distinguish between ForeGround and BackGround Threading?

threading is a parallel processing unit and helps you to access multiple tasks at a one moment of time.... Read More

C# interview questions: - Explain anonymous methods in .NET?

n simple words Anonymous Methods means method which are coded inline or methods without method name.... Read More

Article Categories