Sunday, April 27, 2008

I'm adding this simply for future reference, so please ignore if you'd like. :-)

You may have user accounts on your system (XP or Vista) that will never be used to login to your machine.  These may represent accounts created specifically for services or are simply logons for remote users to access otherwise secured resources.  It bugs me that through the Windows GUI you can't determine whether the account should show up on the Welcome Screen.  At least you can't do it intuitively; I hear you can do it through group membership.  Maybe I'll try creating a 'Hidden Users' group and adding users to it, removing them from the 'Users' group.  I don't know if that will work yet.

But you can remove a user from the Vista Welcome Screen simply do the following:

1. Open the registry (regedit.exe) to HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts\UserList, creating keys as necessary.  For example, I needed to create both the SpecialAccounts and the UserList key.
2. Create a DWORD value for each user you want to omit/remove from the Welcome Screen where the name of the value is the user name.
3. Assign it a value of '0'.
4. Reboot.

This same technique works in Windows XP, though I'd always used tools like TweakUi to accomplish this.  It's nice to know the manual way.

Sunday, April 27, 2008 4:34:00 AM (Mountain Standard Time, UTC-07:00)  #    Disclaimer  |  Comments [1]  |  Trackback
 Tuesday, April 22, 2008

Sticking with the tradition established over the past few years, we have another great opportunity to touch base with developers across the valley at our bi-annual Utah Code Camp.  The Spring Code Camp will be held this coming Saturday (April 26th from 9:00 AM to 5:00 PM) at Neumont University.

These events have been getting better and better each time.  There is a great group of speakers this time as well (not that we didn't have a good group in years past :), but it seems that the Code Camp is diversifying as well - which is great!  We have talks on Scrum, CakePHP, Developing on Windows Vista, TSQL, Windows Services, XNA development, Silverlight, Mac OSX programming, and much more!  Personally, I'll be sharing my thoughts on Windows Communication Foundation (WCF).

So, come on out and join the vibrant Salt Lake community of developers and have a great time!

What: Utah Spring Code Camp
When: April 26th, 2008, 9:00-5:00
Where: Neumont University (10701 South River Front Parkway, South Jordan, UT 84095)
Registration:
http://utcodecamp.com/event/

Tuesday, April 22, 2008 2:02:00 AM (Mountain Standard Time, UTC-07:00)  #    Disclaimer  |  Comments [1]  |  Trackback
 Thursday, April 10, 2008

That's right, folks, we have the distinct opportunity to once again gather as a community of developers and share our insights and thoughts on the world of .NET.  The time has come once again to convene for our monthly .NET User Group Meeting!

This month's meeting is sure to be an exciting one as we're hosting a Heroes Community Launch! With this particular event we have volunteers from the group willing to share on three distinct topics: Visual Studio 2008, and SQL Server 2008. You won't want to miss it!

In the coming months we'll take the various topics and do some additional deep dives into each one.

Come on out, invite your friends and co-workers and be among the first to receive technical demos, readiness kits, and much more. We have several Not-For-Resale copies of each product to be given out as well to some lucky winners!

Time: 6:00 PM
Date: Thursday, April 10th, 2008
Place: Digital Draw Network (10897 South River Front Parkway, South Jordan, Suite 300)

 

Thursday, April 10, 2008 4:25:00 AM (Mountain Standard Time, UTC-07:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Thursday, April 03, 2008

Today I set out to create a TextBox that would provide the user with a built-in prompt.  I didn't want a TextBox control that included a Label.  Instead, I wanted something akin to the password field in Windows Vista's logon screen; the field has the prompt built-into the TextBox in a faint, perhaps italic font when the control is empty.  Once the user performs an action that causes text to appear (i.e., typing, pasting, etc) the faint prompt disappears to accommodate the text.

Now there may be tons of implementations of a similar control out there; I didn't look.  Instead I wanted to 'reinvent the wheel' as it were and figure it out for myself.  Fortunately it only cost me between 5 to 10 minutes and I had something up and working.  The code I've included below is very raw and doesn't include many customizations (you're on your own there :-)

public sealed class PromptingTextBox : TextBox {
  public PromptingTextBox() {
     userPaint(true);
  }

  private Font _promptFont = new Font("Arial", 9.0F, FontStyle.Italic);
  private string _promptText = "Enter text here...";

  ///


  /// Sets or returns the text to display when the TextBox is empty.
  ///

  public string PromptText {
     get { return _promptText; }
     set { _promptText = value; }
  }

  protected override void Dispose(bool disposing) {
     if ( disposing )
        _promptFont.Dispose();
     base.Dispose(disposing);
  }

  protected override void OnTextChanged(EventArgs e) {
     base.OnTextChanged(e);
     userPaint(0 == TextLength);
  }

  private void userPaint(bool enabled) {
     if ( enabled != GetStyle(ControlStyles.UserPaint) ) {
        SetStyle(ControlStyles.UserPaint, enabled);
        Refresh();
     }

  }

  protected override void OnPaint(PaintEventArgs e) {
     Graphics g = e.Graphics;
     g.TextRenderingHint = TextRenderingHint.ClearTypeGridFit;
     g.DrawString(_promptText, _promptFont, SystemBrushes.ControlLight, 0.0F, 0.0F);
  }
}

That's all there is to it - at least for a simple start. Enjoy!

Thursday, April 03, 2008 4:02:00 PM (Mountain Standard Time, UTC-07:00)  #    Disclaimer  |  Comments [1]  |  Trackback