How Windows Forms Works – Webcast tomorrow

I’ll be giving a super-basic overview of the anatomy of a Windows Forms application on Tuesday, November 29th at 11AM PST.   I’ll be taking questions at the end – hope to chat with you tomorrow! Register for this webcastMSDN webcasts


Guest post: response from Regis on DGV questions

Hi jfo, I downloaded the samples and the FAQ document. This grid is really cool. Thank you very much. I also have some questions for you. Question 1: First, does the DataGridView allow ordering by multiple columns? For example, if I want to order columns first by Name, then by City, then by Locality etc,…


DataGridView FAQ now posted

As promised: here’s the link to the DataGridView FAQ.  There’s also a set of demo applications. There are whole bunch more FAQs up on Windows Forms.NET with quite a bit of good info in them.  <shameless ask for plug>Please check the FAQs out if you’re thinking of using Windows Forms 2.0 -if it’s useful, link to it so…


Visual Studio Image Library

A customer from Las Vegas DevConnections asks: It seems like, but I may be mistaken, that you said something about posting some new set of toolbar icons on your blog? Was I in a Vegas-induced stupor or did you really say that? Yes, I really, really did – however I totally forgot to link to it. …


AutoSized, Wrapping RadioButton and CheckBox (VB)

The following RadioButton and CheckBox automatically text wrap when placed in a TableLayoutPanel or FlowLayoutPanel. Imports System.Windows.FormsImports System.CollectionsImports System.DrawingImports System Namespace Microsoft.Samples     Friend Class WrappingCheckBox        Inherits System.Windows.Forms.CheckBox         Dim cachedSizeOfOneLineOfText As System.Drawing.Size = System.Drawing.Size.Empty        Dim preferredSizeHash As New Dictionary(Of Size, Size)(3) ‘ testing this out – typically we’ve got three different constraints.         Friend…


AutoSized, Wrapping RadioButton and CheckBox (C#)

The following RadioButton and CheckBox will text-wrap when placed in a TableLayoutPanel or FlowLayoutPanel. using System;using System.Collections.Generic;using System.Text;using System.Drawing;using System.Windows.Forms; namespace WrappingControlSample {    /// <summary>    /// A check box that can wrap its text onto multiple lines as needed.    /// </summary>    public class WrappingCheckBox : System.Windows.Forms.CheckBox {        System.Drawing.Size cachedSizeOfOneLineOfText = System.Drawing.Size.Empty;        Dictionary<Size, Size> preferredSizeHash = new…


Getting started with Windows Forms 2.0

Here’s a great set of stuff to get you started using some of the new controls/features in Windows Forms 2.0! Client Settings  [ FAQ | Feature Page ]Data Binding    [ FAQ | Sample and Demo | Feature Page  ]DataGridView   [ FAQ | Sample and Demo | Feature Page ]Designer                 [ FAQ  | Presentation | Sample and Demo ]Layout Features       [ FAQ  | Presentation |…


New sample: SplitButton

Now that the toolstrip has a split button, everyone seems to want one for their form too.  While you could tweak out the ToolStripRenderer to do this, it’s probably just best to use the ButtonRenderer class on your own custom button.  The following sample shows how to use the ButtonRenderer class to create your own…


Building a SplitButton

The following sample creates a split button that you can use on your form.  It makes use of the ButtonRenderer class to custom draw a button. Sample code for adding a SplitButton: SplitButton sb = new SplitButton();sb.ShowSplit = true;sb.ContextMenuStrip = new ContextMenuStrip();sb.ContextMenuStrip.Items.Add(“one”);sb.ContextMenuStrip.Items.Add(“two”);sb.ContextMenuStrip.Items.Add(“three”);this.Controls.Add(sb); Code for SplitButton: using System; using System.Collections.Generic; using System.Text; using System.Windows.Forms; using System.Windows.Forms.VisualStyles;…