using System; using System.ComponentModel; using System.Threading; using System.Threading.Tasks; using System.Windows.Forms; namespace TaskTest { public partial class Form1 : Form { static string finished = “new”; static string message = “new”; static int result = 999; public Form1() { InitializeComponent(); textBox3.Visible …

Simple Task.ContinueWith(), updating WinForms control on a different thread Read more →

Option to pick automatic, left, or right rolls. private void Dymo() { try { PrintDocument pd = new PrintDocument(); pd.PrinterSettings.PrinterName = “DYMO LabelWriter 450 Twin Turbo”; PrinterSettings.PaperSourceCollection sources = pd.PrinterSettings.PaperSources; // pd.DefaultPageSettings.PaperSource = sources[0]; // Automatic // pd.DefaultPageSettings.PaperSource = sources[1]; …

C# Print directly to a Dymo LabelWriter 450 Twin Turbo Read more →

Discovered a new feature in the Telerik Winforms framework. Embedded Labels! Now to add a button to the control. There are several layers that need to be moved and reattached. private void TextBoxButton(RadTextBox textBox, string svgImagePath) { // Copy existing …

Add an SVG image button to a Telerik RadTextBox with and Embedded Label Read more →

A simple example using LightVisualElements and html for a custom ListView look. Creates a listview with three columns, the first the row’s text field and columns two and three contain a StackElement with LightVisualElement children.   using System; using System.ComponentModel; …

Telerik Winforms Custom RadListView Rows Read more →

Here’s my simple version using System.ComponentModel; //Define a class to hold the event arguments, if one isn’t already defined. public class DesignEventArgs : EventArgs { private DesignListItem item; public DesignEventArgs(DesignListItem item) { this.item = item; } public DesignListItem Item { …

Dirt Simple C# .NET Custom Event for UserControl Read more →