Wednesday, 15 February 2012

Binding ImageLocation to a PictureBox in C#

The sample code for Binding ImageLocation property of the PictureBox to a column in Database is :

picturebox1.DataBindings.Add("ImageLocation", Datasouce, "ImagePath",true);

ImageLocation  --- property of the PictureBox Control
Datasource       --- DataTable that contains the ImagePath
ImagePath        --- Column Name of the Image paths in the DataTable
true                  --- Enables the formatting of the value as True

There are 5 more overloads for the Function. But this one works fine for most of the cases. Intellisense of Visual Studio will give you additional information about of the other overloads when you type this code.

Thursday, 14 April 2011

5 ADVANTAGES OF BEING LAZY

                 You have heard people shouting at or accusing Lazy people. If you are a lazy one or one who shouts on lazy people, here is an article, you must read, and realize some truth about Lazy people and how good Laziness is. Here are the 5 main advantages of being Lazy:







1) Time


When you are lazy, you spend a lot of time easily so that you need not plan for that as Brisk people do. Also you are not wasting your time, as you are always occupied, whereas the brisk ones complete the works soon and feel that they need to use their time efficiently.

2)No Stress

You won't get stress if you are lazy because you will be lazy for that too. When others will be burning hot with the tension, lazy ones will always remain cool and confident for they always know their ability.

3)Good Citizens

Lazy people are always good citizens for they are too lazy to disturb others. These people, who are too lazy to disturb themselves, are not hard hearted like others to peep into other's life. Terrorism can be completely demolished with the tool of Laziness. If laziness spreads out, then there will be no terrorism in this world.

4) Patience

The Lazy people has lot of patience. They never hurry or mess up things very quickly. They have the ability to wait till the last moment and they also wait after that, if necessity warrants. Everything comes to one who waits.

5)Sixth Sense

A lazy person's sixth sense is always busy. The person is never satisfied with the work mechanism and is always in search of shortcuts. So Intelligent people are people who are lazy to do things in complicated and traditional mechanisms and find ways to do it much simpler. Calculator is because of laziness to do maths. Transport system is because of laziness to walk. So its laziness that makes life easy. 
                    America is still the No.1 nation because Americans are lazier than Japanese and Japanese are the most brisk people in the world. Now we know why India is not the No.1 Nation; We Indians are also more brisk than the Americans. So to make India the No.1 Nation of the World, we Indians must take the vow of Laziness.

"Let's be Lazy. Let's be crazy.Let's be Cozy"