Archives / 2004 / December

  • January 2005 "Advanced Basics" column up on MSDN

    Tuesday, December 14, 2004
    Yet another control development topic... this time I'm building a 'star rating' control, similar to what you find in Windows Media Player's UI... Check out the article here: Creating a Five-Star Rating Control [read more...]
    Filed under | 9 comments »
  • Enter Instead of Tab

    Monday, December 13, 2004
    I received another interesting, and common, question today about using Enter instead of (or in addition to) the Tab key to move the focus between fields on a form. Well, that isn't too hard to accomplish, but it can get tricky once you consider all the different situations... First, the easy... set your Form's KeyPreview property to true, override OnKeyUp (or OnKeyDown... can't think of any real reason to use one or the other in this case), check for the Enter key, then call your Form's ProcessTabKey method. Protected Overrides Sub OnKeyUp(ByVal e As System.Windows.Forms.KeyEventArgs) If e.KeyCode = Keys.Enter Then [read more...]
    Filed under | 17 comments »
  • Lead Developer position available with MSDN

    Monday, December 13, 2004
    Just posted recently, there is a opening at MSDN for a "Software Development Engineering Lead". This is within the same group that I have just joined and it looks like a great job for the right person. Here is a brief snippet from the full job description.... Come leverage state-of-the-art technology! The MSDN/TechNet development team is looking for you to help us innovate in many exciting areas for our Development and IT Professional communities. We are looking for seasoned Development Lead that can deliver and strategize our tooling for Content Management, Personalization, Rendering and Publishing efforts. This is highly collaborative [read more...]
  • Follow up to 'drawing rotated text'

    Thursday, December 09, 2004
    The same programmer who ask for an example of rotated text is back with another interesting request; how to partially fill a circle from the bottom up... as if it was a glass that you've poured water into... so here goes (this is only a snippet of the code, see the original post for the rest); Protected Overrides Sub OnPaint( _ ByVal e As System.Windows.Forms.PaintEventArgs) e.Graphics.Clear(Me.BackColor) Dim bounds As Rectangle Dim g As Graphics Dim rotation As Single = 0 g = e.Graphics bounds = New Rectangle(50, 50, _ Me.Width - 100, Me.Height - 100) Dim percentageToFill As Single = [read more...]
    Filed under | 6 comments »
  • DataGrid programming...

    Thursday, December 09, 2004
    Customizing the data grid (in Windows Forms) was always one of the most popular topics on the C# or VB developer centers, so I'm sure a lot of people will be interested in this article. It is in C#, so far, but if you'd like to see it in VB I'd suggest you email the writer (email at the bottom of the article). Styling with the DataGridColumnStyle, Part 1 Explains the rendering infrastructure of the Windows Forms DataGrid control, including the various resources that the DataGrid utilizes to display its data. [read more...]
  • I just can't get enough Penny Arcade...

    Sunday, December 05, 2004
    He was talking about the generic bad guys in the new Prince of Persia game, but this line crosses into Halo, and it is so true... "Halo has those little grunts, and I guess I'm supposed to feel like a bad-ass when I destroy them but I actually just feel like an asshole. They both seem like races that just fell in with the wrong crowd. What they need are compelling after school activities, not death."From Penny Arcade (December 3rd, 2004) In Halo the grunts have a lot of great lines, the general gist of which is that they are [read more...]
  • Drawing rotated text...

    Thursday, December 02, 2004
    A customer emailed me today (via the VB FAQ blog) with a question; "how can I output text at different angles, to write the cardinal points around a compass for example..." so I decided to fire up a quick sample Public Enum Direction As Integer  N = 0  NW = 1  W = 2  SW = 3  S = 4  SE = 5  E = 6  NE = 7 End Enum Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs)  e.Graphics.Clear(Me.BackColor)  Dim bounds As Rectangle  Dim g As Graphics  Dim rotation As Single = 0  g = e.Graphics  bounds = New Rectangle(50, 50, Me.Width - 100, Me.Height - 100)  Dim rect As System.Drawing.RectangleF  g.DrawEllipse(Pens.Black, bounds)  Dim myMatrix As Drawing2D.Matrix  Dim [read more...]
    Filed under | 9 comments »