Posts tagged ‘CSharp’

Creating a Simple Sheet Designer in C#

Today, we are going to create a simple application, actually a simple sheet designing tool. This tool gives the user the flexibility to design his sheets, reports, bills, invoices, and receipts (whatever.)

Hard Links vs. Soft Links

This writing talks about hard links and soft links; two of the nice features of NTFS file system.

You can divide file links into two categories: 1) Normal Links (shortcuts) 2) Symbolic Links

Creating a Sound Recorder in C and C#

This writing will focus on how you can record sound from an input device and how you can play sound files using MCI (Media Control Interface) in C and C#.

This writing does not involve a discussion or even an introduction to MCI. Instead, it provides technical discussion of what we will need to use to record and to play sound files. If you need an introduction to MCI refer to the MSDN documentation.

We will begin by a discussion to types and functions required to accomplish our tasks. Then we will look on how you can utilize those types and functions in your C or C# application.

Our demonstration examples in this writing will be in C. In the last section we will have a look at .NET and C#. Besides this, there are sample applications written by C and C# attached with the article.

Marshaling with C# – Chapter 3: Marshaling Compound Types

Marshaling with C# Pocket Reference
Chapter 3: Marshaling Compound Types (structures, unions, etc.)

Marshaling with C# – Chapter 2: Marshaling Simple Types

Marshaling with C# Pocket Reference
Chapter 2: Marshaling Simple Types (primitives, booleans, strings, etc.)

Marshaling with C# – Chapter 1: Introducing Marshaling

Marshaling with C# Pocket Reference
Chapter 1: Introducing Marshaling

Marshaling with C# Pocket Reference

Marshaling with C# Pocket Reference (online version + direct download links)

Learn how to marshal between managed types and unmanaged types.

Sending Mails in .NET Framework

This lesson focuses on how to send mail messages in .NET Framework via a SMTP server. It firstly discusses the techniques which .NET Framework provides you to send mail messages. After that, it discusses types available for you when working with SMTP servers. Next, it discusses how to implement these techniques and to send mails from a .NET client.

At the end of this lesson, there is a sample application, Geming Mail+, which is used to send mails from a various SMTP servers. This application is open-source, so you can download its code freely.

Working with SQL Server Logins

This lesson discusses all the details of SQL Server logins. It begins by discussing how to create SQL Server logins. After that, it focuses on how to change the properties of existing login. Next, it discusses how to delete an existing login. Moreover, we will focus on how to enumerate a list of existing logins and roles. Lastly, we will talk a look on how to manage login permissions in SQL Server. In addition, we will link between SQL Server and .NET Framework and we will teach you many techniques other than what this lesson is focusing on.

Requesting Admin Approval at Application Start

User Access Control (UAC) is a feature of Windows that can help prevent unauthorized changes to your computer. UAC does this by asking you for permission or an administrator password before performing actions that could potentially affect your computer’s operation or that change settings that affect other users.

Moving a Form without the Title Bar

Today, we are talking about how to move a form without its title bar.

You might have noticed that some applications with fancy UIs do not allow the user to move the window from its title bar. Honestly, some hide the overall title bar from the user. An example of these applications is Microsoft Windows Media Player -when in skin mode,- and Microsoft Windows Live Messenger. Both applications allow you to drag their windows using the client area not the title bar.

In this lesson, you will learn how to do this trick to move the form without its title bar.

Changing Display Settings Programmatically

Previously, we have talked about how to change screen resolution and color system via DirectX. Today, we are talking about how to change all display settings -not the resolution and color system only- via API. We will change screen resolution (bounds,) color system (bit count,) rotation (orientation,) and refresh rate (frequency) via API with C# and the .NET Framework.

Changing Screen Resolution Programmatically via DirectX

This lesson focuses on how to change the screen resolution and color system programmatically via DirectX. It starts by an overview about how the Windows satisfies user’s need through the Display Settings window. Then, it digs into discussing how to retrieve these settings and to change these programmatically in the .NET environment.

Programmatically Turning on the Screen Saver

This lesson focuses on how to programmatically turn on the screen saver.

Programmatically Taking a Screen Snapshot

Honestly, this lesson is not primarily focusing on how to take a screen snapshot! Instead, it is focusing on how to simulate keyboard strokes and send them to the active application.