The following method will take in a string and return a bool value if it’s a valid number: /// /// Uses Regular expressions to see if we are a number /// /// /// static bool IsNumeric(string…
Using KeyPreview to handle form shortcut keys
If you need to trap shortcut keys in your application to perform misc tasks, use the following code to set KeyPreview to true and then in the KeyDown event handle the actual clicks: private void Form_OnLoad(object sender, EventArgs e) {…
SQL Datetime Woes – The ultimate guide to the datetime datatypes
I’ve not worked with SQL Server DateTime values for a while now so was a little rusty. I needed to do some date filtering and came across the following site by MVP Tibor Karaszi that I found really useful: http://www.karaszi.com/SQLServer/info_datetime.asp
Dotnet Charting
I was looking for some suitable dotnet charting components/code and came across the following three articles. http://www.c-sharpcorner.com/UploadFile/pseabury/2DCharting11152005052210AM/2DCharting.aspx http://www.c-sharpcorner.com/UploadFile/steve_hall/drawinglinechart02072007053420AM/drawinglinechart.aspx http://www.c-sharpcorner.com/UploadFile/jodonnell/ChartingInGDIplus11192005063716AM/ChartingInGDIplus.aspx Heres a screenshot of the one i’m using:
Get your local machine/computer name in c#
Four ways to get your local network/machine name: string name = Environment.MachineName; string name = System.Net.Dns.GetHostName(); string name = System.Windows.Forms.SystemInformation.ComputerName; string name = System.Environment.GetEnvironmentVariable(“COMPUTERNAME”);
Need a volume or slider control in your application? Check out the Advanced TrackBar
I needed a slider control to use as fader sliders in an audio application I was writing using the ASIO libraries to control a MAYA44 USB audio device. Came across this one immediately and got right into using it, I…
Need to left click on a NotifyIcon?
I’m working on a client/server application that uses touch screens for user input. The app uses the NotifyIcon class to minimise the app to the tray when not required with a ContextMenuStrip to handle right click operations, herin lies the…