Review 2010-cum- thanksGiving ()

so it is the last day of the year 2010, and definitely the last blog for this year itself.

as you could guess that I just here to review my year with all of you... this could be prove to boredom for you, ...but after all it makes me to feel that some things in life either good or bad will never persist with me.. but the lessons i got learn, will always. So whatsoever I have done till this second, i did with my wish...so what so ever result i got are due to me, so for what ever bad have happened, no one is responsible except me and, the opposite of it, I thank every one who have helped me to achieve this opportunity to enjoy the good moment of life.

Thank you almighty and thanks to everyone to avail me this opportunity to express my sincere thanks... !!! :)

thank you so much once again!  

Review of 2010 cum Thanks giving moment.


Catching the value of any Kind of Dialog Boxes

How to use the value return by any message box?

We use message box when we want to make aware of any info, warning, error, message, greeting anything by your candidate system. In this case we just use the enumerator DialogResult class which help us to know the result of any click made over on a MessageBox control.

Lets do a hands on example

first of all we design a form, according to this situation I open a new form using File-> New -> Project option in C# language section.
Keep the name whatever u wish, for simplicity I have not change the name of form.
Lets do Design  of our form.
Just place a button and a label.
we would double click on “Button “ and it will open its handler in which we could write code that we want to execute.
that is we wanna execute a message box, and over which when we click which ever button, it would return the value of click. I hope this scenario is as clearer as like water.

just go through pictures and understand the process what I have done to accomplish what has said above.
Pic 1:
 Pic 2:


Picture 1: here we just create a form and double click over that.

Picture 2: here we have been writing code. Open a message box and taking it s value into enum class object of DialogResult. It is really important line of code… which ever controls value you are thinking to be read like Open dialog or Save dialog box you can use this enumerator class and make your job simple.

DialogResult d = MessageBox.Show(“your message”,”title”, MessBoxButton.OKCancel, MessageBoxIcon.Stop);

I hope you have got what were going on in the code written above, now it is time to taste the result of our hard work.

in the above image, which is the output of our example we generate a message box on the click over button1. And For instance we click over OK button, now see what actually happens below.

It is displaying OK text on the label1, which means we have selected OK button. That is what we want to show to the user, now if you want to see CANCEL text on the label1 then you must write the code in Visual Studio IDE for .net framework.

Leave your comment under here, if you face any problem in executing the above program in any way.

Post related to CSharp programming


Line Number along with Code in VS2008/VS2010/VS2012

Hello buddies!

We often need to go on a particular line number to check the error found, specified by the IDE, (Visual Studio 2008). In this way you can understand the need of line numbers along with code. however you can go on a particular line by pressing a key combination that is (ctrl+G), and input the line number there and you will take to the desired line number for whatever reason you want to go there.

Well there is one very simple trick to display each line for your code. These are as follows:-
1> Click Tools menu.
2> Click Options.
3> At the left hand side pane, select Text editor
4> Select Basic. and in General option check the check box attach with Line numbers (if you want to display only at a platform upon which you are working at present than select that platform and again follow the same step- General>Check the box attach with Line numbers).
5> Finish :)
Click Tools

Text editor-> Basic-> Check Line number

->Text editor -> C# -> Check Line number

Search This Blog

Let make your friend aware about this post