Kevin Dente's Blog

The Blip in the Noise

  • Tab control with no visible tabs

    One of my co-workers wanted to use a Windows Forms (2.0, in this case) TabControl as a way of swapping between sets of controls, but without display the actual tabs (controlling the switching entirely through code - a sort of swappable panel stack). After some fiddling around with various control settings, I found that  the following seems to work:

    1. Set SizeMode to Fixed.
    2. Set ItemSize to 0,1. The control won't let you set a size of 0,0, but 0,1 seems to have the desired effect.
    3. Set Appearance to Buttons. This removes the tab control border.
    And that's it. You can work with the tab pages easily in the designer, and use the TabControl properties to set the active tab at runtime.

    Update - One limitation with this approach is that you can't easily change the background color of a tab control. So if you want, for example, a white background on your form, you're out of luck.

  • Riffing on Scoble - Live.com launching without Firefox support

    OK, this commentary is a little late, as plenty has been said about Live.com's initial lack of support for Firefox, and the problem has already been addressed. But dammit, I'm writing it anyway.

    A while back Robert wrote about an MS web site with no RSS feed. His stance?

    Sorry, if you do a marketing site and you don't have an RSS feed today you should be fired.
    Robert, my version of that comment is:
    Sorry, if you do a web site and you don't support Firefox today, you should be fired.
    Especially if the web site is targeted at tech types, which Live.com clearly is (at least initially). Why? Because the majority of influentials (the tech type influentials, anyway) run Firefox. In fact, virtually everyone even remotely technical that I know runs Firefox these days, including my boss' boss. Hell, you probably would have been better off ONLY supporting Firefox. By only supporting IE initially, an entire group of users (and a rather important one) were disinterested right out of the gate, and getting them back on board is going to be extra work that shouldn't have been necessary.

    I know that there are time and resource contraints on these projects, there's no feature in Live.com that should have been given a higher priority than Firefox support. I hope that the initial response from the blogosphere has made that clear for the future.

    PS - I'm not actually in favor of anyone geting fired. Just, you know, a little dramatic exaggeration for effect. :)







  • MSBuild Team releases AssemblyInfoTask

    The MSBuild team has released a great new task, the AssemblyInfoTask. This task makes it easy to automatically update the assembly version numbers (both AssemblyVersion and AssemblyFileVersion, as well as other assembly information attributes) as part of your build process. Neil, on one of the PMs on the team, was nice enough to give me an early look version of the task, and it ROCKS. It's very flexible and easy to use - easily the best solution to the problem that I've found.

    It took me a couple iterations to figure out the best way to incorporate it into our multi-project, multi-solution build, but with some tips from the MSBuild team, I got it working very cleanly and effectively. I'll post some info about how I did it in another blog post when I get a chance.

    Oh, and they've released the source (with unit tests) as well. Very cool.

  • Holy smokes, it finally happened - VS2005 on MSDN Subscriber Downloads

    That's right, VS2005 has been posted for download. That groaning sound you hear is the MS servers being crushed under the load of too many downloads. So far Pro and Standard versions are up, as well as something called "Team Suite Trial Edition". Huh? Also, they've only posted the CD images - I'm hoping for DVD images soon.

    Unfortunately, I'm just getting errors when I try to download it right now.

    Update - It seems that which media you see depends on which server you hit. I went back in again, and the CD version was gone and the DVD version was there. I was able to successfully kick off a DVD download, and it's chugging along. Should be done downloading sometime next month. ;)

  • PDC software - back to CTP hell

    Lots of bits coming out of the PDC this week. Most of the bits - Atlas, WinFX, WWF (someone had some fun picking that name), run on VS2005 beta 2. But the LINQ stuff requires VS2005 RC1, as does the latest drop of SQL Server 2005. *Sigh* I can't wait til November 7. Really I can't.

    Update - Joseph Cooney commented that LINQ does in fact run on VS2005 beta 2. I swear I saw some MSDN page that said otherwise, but now I'm not finding that page, so perhaps I was suffering from an information-overload-induced hallucination. ;)

    Update 2 - Duh, found the page that says the VS2005 RC is required for the LINQ tech previews - the main LINQ project page!

  • VMWare 5.5 supports Virtual PC images - sweet!

    VMWare just released the beta of VMWare 5.5, which is capable of opening and directly working with Virtual PC images. Very cool! Now that Microsoft has taken to releasing pre-installed VPC images for various products, I was considering installing VPC just to be able to use them.  Now I won't need to. Of course, VMWare has had a converter tool for a while, but directly working with VPC images without converting them is much nicer.

    It looks like you can't directly change the native VPC image - changes are accumulated in a separate VMWare-specific file. But I think I can live with that limitation. For now, anyway. ;)

  • Top 10 signs you're addicted to VMWare

    10. You're more excited about the next release of VMWare than the release of Longhorn.
    9.   Your home network has 3 machines, but your router reports 15 IP addresses in use.
    8.   Your Windows reports 418MB of RAM. Just because you can.
    7.   Every time a Windows patch is released, you need to run Windows Update 15 times.
    6.   You have no qualms about installing every Microsoft beta product there is.
    5.   You'd rather have an ISO image of a product than a real CD.
    4.   Before alt-tabbing to Outlook to check your email, you always hit Ctrl-Alt first.
    3.   Before installing any software, your first instinct is to take a snapshot.
    2.   When sitting down in front of a freshly booted Windows XP machine, you hit
          Ctrl-Alt-Insert.
    1.   1GB RAM? Not nearly enough!

  • CruiseControl, MSBuild, and Unit Tests

    While converting our continuous integration process from Nant to MSBuild, I ran into a problem with unit tests. The build script runs our unit tests by calling the nunit-console.exe test runner with the Exec task. The tests reside in a number of assemblies, so I used an ItemGroup to list test assemblies, and batched the call to nunit-console.exe (as described in Peter Provost's blog posting). I wanted to run all of the tests, even if some of them failed, and my first thought was to set the ContinueOnError attribute of the Exec task to true. Unfortunately, there's a problem with this - it turns out that "Continue On Error" really means "Pretend task succeeded". In other words, even with test failures the outcome of the build was "success", and CruiseControl wouldn't report the build as failed. No good.

    The solution to this turns out to be trickier than it probably should be, but it is possible. The idea is to store the exit code of the Exec task into an item group (one item per Exec), then use an Error task to check if any of the Exec's returned errors. Building on Mr Provost's example, the UnitTest target becomes:

    <Target Name="UnitTest" DependsOnTargets="Compile">
     <Exec ContinueOnError='true' Command='$(NUnitEXE) $(NUnitArgs) @(TestAssembly)' WorkingDirectory='%(WorkingDirectory)'>
    <Output TaskParameter="ExitCode" ItemName="ExitCodes"/>
    </Exec>
    <Error Text="Test error occurred" Condition="'%(ExitCodes.Identity)'>0"/>
    </Target>




  • ObjectDataSource and Caching in .NET 2.0

    One of the disappointing limitations in .NET 2.0 beta 2 is that the ASP.NET ObjectDataSource control only supports caching when binding to DataSets and DataTables. Since ObjectDataSource is really intended for binding to domain objects, that design limitation didn't make much sense to me.

    According to Nikhil Kothari, demi-god of ASP.NET, this limitation is being addressed for the final release. This is great news!

  • IE6 Tabs with MSN Toolbar - Nice idea, flawed implementation

    When I heard that MS was adding tabbed browsing features to IE6 via the MSN Toolbar, I thought it sounded like a great idea. Unfortunately, the implementation of the idea isn't so hot. Things I've noticed so far, just in playing around with it for a few minutes.

    • Creating a new tab and switching tabs causes the entire UI to flash and repaint in a very annoying way. This is the biggest problem I have with the feature - it's very distracting.
    • Explorer bar visibility is remembered per-tab. This causes the UI to rearrange itself as you flip tabs.
    • There doesn't seem to be a way to open a Favorites item in a tab.
    I'm happy that MS is embracing tabbed browsing (it is one of the big reasons that I switched to Firefox). But it looks like we'll have to wait until IE7 for an effective implementation.