Skip to content
Latest
Dotnet Debug Tracing Components

C# Tracing & Event Logger Explained

In this article, we will learn how to push C# debugging information into the Trace File and Windows Event Logger. This is useful when the application is deployed in the customer place. Debugging an application in customer place is almost not possible as we do not keep the source code in the deployed environment.
The screen-shot below shows our Example and you can download it from the link at the bottom of this article. Here, we will not explore how the application performs prime number summation. But, will learn how to perform tracing using the C# Application Programming Interface.

MFC Keyboard Messages

Handling MFC Keyboard Messages With Shift & Toggle Key State

We know that keyboard and mouse are basic hardware interface supported by almost all the Computer Operating System. When the user hits the keyboard key, the device driver for the keyboard deals with it by making use of the interrupts. In this example we will learn how to handle Keyboard Messages using MFC SDI Application. First, We will provide a handler function for the Keyboard. Then, inside the handler, we will check for Shift Key State and Toggle Key State.

Debugging Windows - Immediate Window

Debugging Windows in C# Explained

Microsoft Visual Studio provides various debugging windows to make the developer’s life easy when they analyzing the code for fixing logical bugs or crashes. In this example, we will use the sample application to learn various debugging windows autos, locals, call-stack, output and immediate.

Fixed Size MFC SDI Application

Fixed MFC SDI Window Using CREATESTRUCT & PreCreateWindow

In this Example, we will look at wiping out the minimize and resize button from the MFC Single Document Interface (SDI) Application using PreCreateWindow Override and CREATESTRUCT. Of course, we can do that with the MFC Wizard itself. However, that option is restricted to design time. Moreover, knowing how to carry out this in run-time is useful as the Application can behave based on the INI file or configuration file settings.

Defining the Redraw clipping region

Message Handling in MFC Application Explained

Software application user interacts with the windows applications through the main external devices like Keyboard and Mouse. In MFC, hardware events from these devices are seen as ‘Windows Messages’. An MFC application programs responding to these windows messages are called ‘Message Handling’. In this example, we will create an MFC SDI Application and then Handle Left and Right mouse click events. This will make you understand how windows messages are handled in the MFC Applications.

The BreakPoint Window

Breakpoints & CSharp Application Debugging

Debugging is the process of finding the logical errors in the program by checking the source code during the execution. The execution of a program pauses when the break-point is hit. Here, I will walk you through the debugging using the sample EXE found with this article. We will start breaking the execution with Breakpoints, then we will see step-in and step-out options. Finally, we see how to add a conditional breakpoints.

Setting Conditional Compilation For CSharp Project

FAQ on C-Sharp Project Properties

A C-Sharp Developer must know various project properties and how it impacts the projects. In this example, we create some sample projects and examine various c-sharp project properties. This is useful for all c-sharp developers.

How Single Call Server Activated Object Works

Single-Call Remoting (Server Activated)

‘Dotnet Remoting’ is a client and server based distributed object technology. In this article, we will make two applications. One is a Remote Server, and another one is a Client. First, we will complete the Server application and then carry out with the client. Here, we create Single Call remote. You will learn more about it in this article.