Skip to content

Instantly share code, notes, and snippets.

@georg-wolflein
georg-wolflein / non-selectable-text.css
Created February 25, 2014 22:31
Keep the user from selecting text of class "non-selectable".
.non-selectable {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
cursor: default;
}
@georg-wolflein
georg-wolflein / CustomFormShape.cs
Last active June 3, 2021 06:11
Make your Windows Forms in any shape. See a complete example in use at https://gist.github.com/georgw777/8900739.
// Don't forget to include the following:
using System.Windows.Forms;
using System.Drawing.Drawing2D;
// Form paint event.
private void FormRound_Paint(object sender, PaintEventArgs e)
{
// Put this in the form paint event void.
// Create a GraphicsPath that should represent the form's shape.
GraphicsPath formShape = new GraphicsPath();