Monitor File System via C# FileSystemWatcher

Monitor File System - FileSystemWatcher Component Example

C# FileSystemWatcher Component will track the changes in the file system. Simply we can create a decent looking Monitor File utility within one hour. The changes may be file creation, deletion, Modification and renaming. In this example, we will create an app that can spy on your file system based on the folder path that we mention. Whenever a change is found in the file system, the control gives a signal to the listening application through the FileSystemWatcher events.

Ranking Functions Examples – RANK, DENSE_RANK & Percentile

SQL Dense Rank Example

Ranking Functions are useful to provide ranking on the table columns based on the value stored in it. Say, for example, let us say a table is having students id and their Total Marks as separate columns. Now, it is meaningful if we apply the these function on the Total Marks column rather than Student ID column. With these Functions, we can easily find 2nd maximum, or 4th maximum marks. The Ranking Functions are available in SQL 2005 and later versions.

BackGroundWorker Component & Progress Bar of C#

C# BackgroundWroker Component Example

‘BackgroundWorker Component’ is used to do long-running tasks in the background while the application runs in the foreground. When the background task is going on, the application can still look for the user events and replies to them. Generally when the application is busy doing a long-running task, users of the application cannot reach out with the UI items. This is because there is only one thread which is busy dealing with the long-running task. Here, we will create a sample that counts vowels of the textual content given in a text box. To make that as a long-running task, we will ask the execution to sleep for 50 milliseconds after processing a single character. Using this sample task, we will create our example and study the C# BackgroundWorker Component.

Web Config File and Tracing in ASP.Net

Broken Link On Home Page

Web configuration (Web Config) files are important for all the hosted websites. Every application requires settings that tells the application how it should behave. Also, it will be handy to use as all the settings go in one place and if somebody wants to change some settings, they know this one stop place. What if we don’t use these Web Config files? We should do it through the code. Now we will think of a situation of 100 settings for a website. If it is done in the code, anyone requires configuration change out of these 100, first need to search and pinpoint the piece of code that requires the changes. Then they should compile the binaries of the website and re-launch it. This requires a website maintenance window & during that time the website will be down. The ‘Web Config’ files avoid rebuilding the websites assemblies and keeps...

Playing Sound Via C# SoundPlayer & AxWindowsMediaPlayer

Windows Media Player Active-X Control

In this example, we will see how we can play sound files in C#. We can play Sound in two specific ways. One way of playing is using the SoundPlayer class from ‘System.Media’ Namespace and the other way is using the ‘Windows Media Player Active-X Control’ called AxWindowsMediaPlayer. In this article, we will try both the ways by playing a ‘.wav file’. You can test yourself for more functionality on the specific area

C# RichTextBox Explained with Examples

C# RichTextBox Control Example

C# RichTextBox control is like a text box control. But it supports rich text contents. In this example, we will use this control and learn how to read and write rich text content. The example shows how one can apply rich text attributes like bold, italic and fonts to the containing text. The last part of the example walks you through clipboard operation and using the Undo and Redo featured of this control.

Remoting Config File for Server & Client

A Sample Dot Net Remoting Configuration File (Client & Server)

In this example, we will see how to configure and use configuration files for dot-net remoting. Here, we create config file for both server and client. These config file replaces the configuration done through code. This example uses the Singleton Remote server example and then replaces some code with configuration file.

MFC CRgn Example – An Elliptical Dialog

MFC Round Window Using CRgn

CRgn is an MFC Class, which is useful to define regions. Using this one can define the outline of a telephone, DVD, Disc, etc. Once a region is ready, we can assign that to any MFC Window. This way one can display a telephone outline dial-in number pad as a window. In this example, we will create an elliptical MFC Login Dialog using CRgn and Region Path.