Tag Archives: Tips & Tricks

No Thumbnail

How to allow only number input in your code using C#

Being coder, we often have different challenges to write code to accomplish a task based on some exact requirement. Here we are going to learn how to allow the user only to write number not other characters like “a/A to z/Z” and other special characters

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

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 ==