Skip to content

Instantly share code, notes, and snippets.

View MatthewKing's full-sized avatar

Matthew King MatthewKing

View GitHub Profile
@MatthewKing
MatthewKing / .editorconfig
Last active June 8, 2023 06:17
Baseline editorconfig, gitattributes, and gitignore
[root] = true
[*]
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
[*.{csproj,props}]
indent_size = 2
@MatthewKing
MatthewKing / WinFormExtensions.cs
Last active April 26, 2021 10:29
Extension methods for classes in the System.Windows.Forms namespace.
// Copyright Matthew King 2012-2015.
// Distributed under the Boost Software License, Version 1.0.
// (See http://www.boost.org/LICENSE_1_0.txt)
using System;
using System.Drawing;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Search" -Name "BingSearchEnabled" -Type DWord -Value 0

Keybase proof

I hereby claim:

  • I am matthewking on github.
  • I am mking (https://keybase.io/mking) on keybase.
  • I have a public key ASBwtMSceGTkj0I8hd1O8ABiNdXgp9v86HO7ZQEzjRIy6go

To claim this, I am signing this object:

@MatthewKing
MatthewKing / CueTextBox.cs
Last active June 14, 2017 18:16
A WinForms TextBox that has support for cue banners.
using System;
using System.Runtime.InteropServices;
using System.Windows.Forms;
/// <summary>
/// A Windows text box control with a cue banner.
/// </summary>
public class CueTextBox : TextBox
{
/// <summary>
using System;
using System.Drawing;
using System.Runtime.InteropServices;
using System.Text;
/// <summary>
/// Provides additional icon-related functionality.
/// </summary>
public static class IconEx
{
@MatthewKing
MatthewKing / AssemblyExtensions.cs
Last active December 21, 2015 18:49
Extension methods for System.Reflection.Assembly.* Returns the DateTime represented by the linker timestamp in the specified assembly.
using System;
using System.IO;
using System.Reflection;
/// <summary>
/// Extension methods for the Assembly class.
/// </summary>
internal static class AssemblyExtensions
{
/// <summary>
using System;
using System.Reflection;
using System.Windows.Forms;
/// <summary>
/// Extension methods for System.Windows.Forms.PropertyGrid.
/// </summary>
public static class PropertyGridExtensions
{
/// <summary>
// Copyright Matthew King 2011-2013.
// Distributed under the Boost Software License, Version 1.0.
// (See http://www.boost.org/LICENSE_1_0.txt)
using System;
using System.Globalization;
using System.Linq.Expressions;
using System.Reflection;
/// <summary>
@MatthewKing
MatthewKing / ListViewHelper.cs
Created November 16, 2012 06:22
Provides methods to (properly) enable and disable double buffering on a ListView control.
using System;
using System.Runtime.InteropServices;
using System.Windows.Forms;
/// <summary>
/// Provides methods to (properly) enable and disable double buffering on a ListView control.
/// Based on Giovanni Montrone's article on CodeProject at
/// <see cref="http://www.codeproject.com/KB/list/listviewxp.aspx"/>,
/// and on the StackOverflow answer at
/// <see cref="http://stackoverflow.com/a/162770/286936"/>.