Category Archives: TIPS/TRICKS

No Thumbnail

How to find if a user is administrator or not

It’s quite common to find out whether a user or application is running Admin account or not. well I’ve already posted a article entitled “Run Application Only in Administrator Account”. Have a look there In addition to the above reference, you can use the given

No Thumbnail

Run Application Only in Administrator Account

Many time we have requirement to run application only as a administrator account, not application we need to secure single windows form at many time to give access to those  user who have not Admin account privilege. Take a look how to accomplish this task

No Thumbnail

Get Only DateTime Part without using Convert

All of us know many techniques to get DateTime part in SQL using Convert, but here I found something interesting when I was reading an article of BenNadel [ Who he is  ]  which will work without using Convert Take a look [sourcecode language=”sql”] SELECT CAST( FLOOR( CAST(

No Thumbnail

Convert nvarchar, money and smallmoney datatype to int

This article enables you to convert nvarchar, money and smallmoney values to int. Simply, we can use the given conversion syntax to convert Nvarchar, smallmoney and money datatype values to int values. [sourcecode language=”sql”] select (CAST(CAST(ColumnName AS float) AS INT)) [/sourcecode] or [sourcecode language=”sql”] select

No Thumbnail

Close Application at Press of Escape Button

There are various ways to close an application by pressing the Escape button, using C#. Here are a few: Way 1: Simply add the below given code in your Windows program: [sourcecode language=”csharp”] protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { if (keyData ==