Tag Archives: DllImport

Programatically Change the Default Printer on Windows using C#

Sometimes we need to change the default printer on Windows programatically from a Windows application, like it happened with this developer in one of the MSDN Brazil forums.

Posted in .NET | Tagged , , , , , | 2 Comments

Get line and column number of the cursor position on a RichTextBox

Recently I needed to get the line and column numbers based on the position of the cursor inside a RichTextBox control, in a Windows Forms project.

Posted in .NET, Windows Forms | Tagged , , , , | Leave a comment