in

dotNetFreak

Ramblings & Controls from a .NET Addicted Freak!

Kevin Gearing's Blog

  • Migration Complete

    The migration from .Text to CS 2007 is finally complete!

    All content, comments, trackbacks etc. have been imported and I've also restructured my blog, so if you subscribe via RSS, you might need to update your client. Although, to be fair if that's the case, you won't see this until you actually visit the site...

    If you're looking to move your own blog, or to start a new one, then do check out www.communityserver.org. It's a fantastic product with a lot of scope and capabilities.

    Also, if you're moving from .Text, head over to http://kevinharder.com/blog/archive/2007/06/01/new-text-to-cs-2007-blogs-migration-tool-available.aspx where you'll find the migration utility I used.

    One thing to note if you're migrating from .Text. If, like me you only have a single blog on your Web site, you *might* find an issue when trying to export your existing data using Kevin's software. If no file is created when walking through the wizard, take a look at your .Text 'blog_config' table and see if 'BlogGroup' is set to 'NULL', if so, try changing it to '0' (zero) and see if that helps.

  • A Few Changes...

    As some of you will have noticed I've moved to Community Server 2007 from .Text for my blog!

    I'm still currently porting content and files etc. which is why the release of FormShield v2 has been delayed.

    I'm almost there so I reckon everything will be up and running during the course of tommorrow!

  • StringCompareValidator v2.0.1 Released

    StringCompareValidator v2.0.1 has been released. Click here for details.
  • CasedTextBox v2.0.1 Released

    CasedTextBox v2.0.1 has been released. Click here for details.
  • StringCompareValidator for .NET 2.0 Released

    If like me you've made use of the standard CompareValidator you'll know that it lacks one important feature for comparing strings - Case sensitivity. Whilst working on another control I needed a compare validator that had this capability, so I've created my own custom control - StringCompareValidator.

    Features:

    • CaseSensitive property to allow case-sensitive or case-insensitive comparisons.
    • CompareOperator property to allow equal or not equal comparisons.
    • Provides client-side and server-side validation.
    • Tested in IE6 & IE7 (PC), IE5 (Mac), FireFox 2 (PC & Mac), Safari 2 (Mac), Safari 3 (PC), Opera 9 (PC). 
    • Full Visual Studio .NET designer integration.
    • Works in a 'ViewState Disabled' environment. 
    • Compatible with Medium Trust environments.

    Simple Online Demo
     

    Usage:

    Simply download, add to your toolbox, drag 'n' drop to your page and set the relevant properties using the property grid.


    Licensing & Download:

    Free for both personal and commercial use, however please consider donating!

    You may also redistribute the control royalty free, providing that you don't charge for it. Also, if you intend to distribute the control as part of an application which is publicly available it would be nice to know, although this isn't a requirement.

    To download, please visit the 'Downloads' area.


    Help & Support:

    Please post in the forum.

     

    Revision History: 

    Updated 11/07/2007 (v2.0.2):

    • JavaScript is now embedded as an include rather than outputted into the Web page.
    • ViewState is no longer used to persist property values so the control works in a ViewState disabled environment.

    Updated 07/06/2007 (v2.0.1):

    • Few minor code tweaks.
    • Added demo page to archive.
    Updated 05/06/2007 (v2.0.0):
    • Recompiled under .NET 2.0.
    • Now runs in a medium trust environment.
    • Help now compiled with Sandcastle.

    For the previous .NET 1.1 version, please click here.

  • CasedTextBox for .NET 2.0 Released

    Unlike Windows Forms.NET, ASP.NET textbox controls seem to be missing the 'Character Casing' property which allows you to define the case of characters entered within a textbox.

    Whilst it's fairly easy to replicate by hooking up some JavaScript to the 'onblur event', e.g.

    txtEMailAddress.Attributes.Add("onblur", "this.value = this.value.toLowerCase();");

    it becomes a bit of a pain having to enter this on every page. So, below is a simple ASP.NET control that basically does it for you. It simply inherits from the standard TextBox class and adds a new 'Character Casing' property allowing you to set the character case to one of three options:


    Features:

    • CharacterCasing property to set the case to upper (all characters uppercase), upper first (only the first character uppercase) or lower (all characters lowercase).
    • Tested in IE6 & IE7 (PC), IE5 (Mac), FireFox 2 (PC & Mac), Safari 2 (Mac), Safari 3 (PC), Opera 9 (PC).
    • Full Visual Studio .NET designer integration.
    • Works in a 'ViewState Disabled' environment. 
    • Compatible with Medium Trust environments.

    Simple Online Demo


    Usage:

    Simply download, add to your toolbox, drag 'n' drop to your page and set the property using the property grid.


    Licensing & Download:

    Free for both personal and commercial use, however please consider donating!

    You may also redistribute the control royalty free, providing that you don't charge for it. Also, if you intend to distribute the control as part of an application which is publicly available it would be nice to know, although this isn't a requirement.

    To download, please visit the 'Downloads' area.


    Help & Support:

    Please post in the forum.

     

    Revision History: 

    Updated 11/07/2007 (v2.0.2):

    • Control failed to change the character case in some browsers - Fixed.
    • JavaScript is now embedded as an include rather than outputted into the Web page.
    • ViewState is no longer used to persist property values so the control works in a ViewState disabled environment.

    Updated 07/06/2007 (v2.0.1):

    • UpperFirst now converts the first character of every word to uppercase (ideal for addresses).
    • Few minor code tweaks.
    • Added demo page to archive.
    Updated 05/06/2007 (v2.0.0):
    • Recompiled for .NET 2.0.
    • Now runs in a medium trust environment.
    • Help now compiled with Sandcastle.

    For the previous .NET 1.1 version, please click here.

  • Yes, I am Still Here...

    Just a quick post to let everyone know that I am still around, however I'm in the process of moving house and also the company I work for is relocating and I'm in charge of the complete fit-out and infrastructure for the move and therefore haven't had any time to release updated components, nor to answer people very quickly.

    Please don't be offended if I don't write back to you for a few days. I will continue to answer questions and help where I can, but at the moment I don't have the time to change/update any of the components.

    Everything should start to quieten down during April...

    UPDATE:

    Well everything should have started to quieten down, but the relocation isn't now due to happen until May as the building is still being fitted out at the moment. So much for moving house as well, I'm in the process of redecorating the house before moving in, so unfortunately with everything that's going on at the moment, I'm not likely to get to releasing any new/updated components until at least June...

    UPDATE:

    Scrap that, relocation isn't happening until this month now (June)!

    UPDATE:

    Right, well the re-location finally happened at the end of June, however organising furniture and kitting out the offices took about 5 weeks longer. Since then I've been working on improving the network operations and infrastructure and haven't had chance to do anything with regards to any of the components, nor answer any questions (sorry!). I'm hoping that over the next few weeks my workload will lighten and I can get everybodys questions answered and some new versions released... Bear with me, I'm almost there!

  • DateTimePicker Problems

    I've just stumbled across a couple of great problems with the default WinForms DateTimePicker control:

    Within an application I'm building I need to be able to represent a NullDate. Previously I've always used Date.MinValue to indicate whether or not a date has been specifyed, but after data binding a date property to the DateTimePicker I suddenly found out that Date.MinValue = 00:00:00 01/01/0001, and the DateTimePicker only supports dates after 00:00:00 01/01/1753.

    Fair enough I thought I can understand the logic in that (kind of), so I created a constant within my application called 'NullDate' that returns 00:00:00 01/01/1800, which whilst it isn't ideal, does solve the problem.

    But now I have the problem that the DateTimePicker (even though it's being fed a 4 digit year), believes that 00:00:00 01/01/1800 actually equals 00:00:00 01/01/2000. Argh! Now I need to figure out why! I could understand it if I was passing in a 2 digit date, but not a 4 digit one.

    I'll update this post if/when I find a solution.

    UPDATE:

    Right it looks like it's to do with the property being databound to an object. If I set the 'Value' or 'Text' property manually it displays the correct date, however when an object is databound to the 'Text' property it shows the wrong century. I'm guessing that the DateTimePicker is performing Property.ToString() to get the value from the object rather than Property.ToString(CustomFormat), i.e. Property.ToString("dd/MM/yyyy").

    RESOLVED:

    Change the 'Short Date' settings on the machine to dd/MM/yyyy instead of the UK default of dd/MM/yy.

  • My 3 Pet Peeves with Visual Studio 2003

    I know there are probably a lot more I could come up with, but these are my top 3 that I really hope Microsoft have fixed/resolved in Visual Studio 2005.


    1. Why oh why when you open a solution with multiple projects, including a handful of setup projects does VS feel like it has to expand all of the setup projects? It doesn't do it with any other project type. No matter what I do it ALWAYS expands them.


    2. Pinning the toolbox on some/most occasions hangs VS, the only resolution is to 'End Task'. Has this ever been fixed? Why does it always seem to happen when I REALLY don't want it to? Does VS have some built in sick sense of humour??


    3. Opening some/most help items from the index takes forever. Normally I have time to make a coffee and come back to my desk before it's opened. This can't be related to the performance of the machine either as it took the same time on my old PC as it does on my new one. Anyone know of a resolution to this? Resolved (see below)


    Argh!

  • Google's Captcha Image

    I was just about to add a Web site to Google for indexing when I noticed they're also making use of a Captcha Image to prevent automated form submission. Perhaps they should make it a bit more random before someone gets offended :-)


  • Excentrics World Needs YOUR Support (eWorldUI)

    If you've ever made use of the eXcentrics World custom controls collection (eWorldUI) then you really should head over to the Web site at http://www.eworldui.net/ and sign the petition. I won't bore you all with the details as all of the information is on the Web site.

    If you haven't made use of the controls before, where have you been? Matt has created some great controls over the last couple of years for ASP.NET, many of which I have used in various projects. Even though you haven't used them before, head over to the site and sign the petition anyhow, at least that way if they get reinstated you might have the chance to benefit!

  • New Control - StatusBarEx - Extends the Base StatusBar Control

    At the moment I'm in the process of re-writing an existing application, and throughout this application there are various workarounds I've employed to get around the limitations of the standard Windows Forms controls.

    One of these limitations is not having a ProgressBar embedded within a StatusBar...

    At the moment I hook into the Window_Resize event and move the ProgressBar whenever the window is resized, which does work quite well, but as I also use another workaround to display the date and time in a StatusBarPanel I decided that it was time to extend the base StatusBar with some helpful additions that I needed.

    Now, you're probably thinking I could just have used one of the many StatusBar controls that other people have written, which I would have, but the biggest problem I found was that they didn't do exactly what I wanted and whilst some existed that did, it would mean buying a whole suite of controls just to get the StatusBar.

    In the end I decided to just get on and write StatusBarEx.


    Features:

    Status Bar:

    • Set the background, foreground, border and gripper colours.
    • Supports drawing a flat border rather than a 3D border if required.
    • Includes two different renderers as default; WindowsDefaultRenderer and WindowsXpRenderer.
    • Theme aware when using WindowsXpRenderer (does not require a manifest).
    • Create your own renderers, simply implement the functions within IStatusBarExRenderer.
    • Supports all of the other standard StatusBar features.
    • Full Visual Studio .NET designer integration.

    Status Bar Panels:

    • Set the background, foreground and border colours.
    • Choose from 10 different border styles.
    • Each panel has a standard 'Text' property allowing you to prefix the contents of the 'Value' property with your own text.
    • Two base panels you can inherit from; StatusBarExPanel and KeyStatePanel.
    • Some panels also have additional properties that can be set (see the documentation).
    • Supports icons and text alignment and all of the other standard StatusBarPanel features.

    Panels Included:

    • CapsStatePanel, InsStatePanel, NumStatePanel and ScrollStatePanel - Detects and displays the state of keyboard keys (automatically updates).
    • DateTimePanel - Displays the current date and time (automatically updates).
    • FrameworkVersionPanel - Displays the .NET Framework version.
    • LabelPanel - Similar to the standard StatusBarPanel.
    • MachineNamePanel - Displays the machine name.
    • OsVersionPanel - Displays the operating system version information.
    • ProgressBarPanel - Displays a progress bar and acts similar to a standard ProgressBar control.
    • SystemUptimePanel - Displays the current system uptime (automatically updates).
    • UserNamePanel - Displays the user name of the currently logged in user.


    Screenshots:




    Visual Studio .NET Design Time Notes:

    1. You must use the label buttons that appear under the property grid to add panels at design time to StatusBarEx. If you use the 'Add' button in the collection editor you will receive an exception. I am aware of this, but just haven't had the time to write my own collection editor. If the control is popular and I have the time I'll write one.
    2. Some properties depend on other property values. For example, if you set the border colour of a panel, you must set the 'BorderStyle' to 'Flat' for it to actually draw the border using the colour specified.

    Windows Themes Support:

    StatusBarEx will draw itself using Windows theming if you use the WindowsXpRenderer and if themes are enabled (otherwise it defaults to WindowsDefaultRenderer). At runtime, you don't need to add a manifest, simply add the usual Application.EnableVisualStyles() and Application.DoEvents() before you display any Forms.


    Usage:

    Simply download, add to your toolbox, drag 'n' drop to you Form and set the relevant properties using the property grid.


    Licensing & Download:

    Free for both personal and commercial use, however please consider donating!

    You may also redistribute the control royalty free, providing that you don't charge for it. Also, if you intend to distribute the control as part of an application which is publicly available it would be nice to know, although this isn't a requirement.

    To download, please visit the 'Downloads' area.

  • FormShield v1.1.2 Released

    FormShield v1.1.2 has been released. Click here for details.
  • FormShield v1.1.1 Released

    FormShield v1.1.1 has been released. Click here for details.
  • FormShield v1.1.0 Released

    FormShield v1.1.0 has been released. Click here for details.
More Posts « Previous page - Next page »
Copyright ©2004-2007 Kevin Gearing. All Rights Reserved.
Powered by Community Server (Non-Commercial Edition), by Telligent Systems