C1Sizer and C1Sizer Light
I started with one of the smaller tools, but one which looked as though it would help resolve a common problem.This is the C1Sizer component.Although the Dock and Anchor properties built in to Visual Studio .NET 2005 are much improved,I still find that the individual tweaking of the size and relative position of controls as a form is being resized can still be a pain.
The Sizer components are designed to take away that aggravation.From the small test projects I created to try these components out, I can tell you that they succeeded in doing so very impressively.
Beginning with the SizerLight component, I added it to the toolbox in a solution I had created previously.With a form containing standard Winforms controls the component worked perfectly straight out of the box.All controls were resized as you would wish, no overlaps, no ugly text displays.It functioned properly whether I used the Resize handles on the form at Run Time or if I clicked the Maximize and Minimize buttons.
I had the odd tricky moment when I then tried to use Sizer Light in a Windows Form which contained some user controls I had created.Dragging via the resize handles was fine, but I got some very strange end results after I maximized or minimized-then-restored the form.However, ever optimistic, I ran the project through the Publish Wizard, installed it on my development machine and was pleased to see that all the resizes worked just fine, including the user controls.I guess it must just have been one of those VS Design Time graphics glitches that occur from time to time.
This component really does take the pain out of all that Dock and Anchor fiddling and is absolutely simple to use.
I then moved on to the more sophisticated C1Sizer component.This offers you far greater flexibility and an almost infinite level of detail.At the basic level, this component allows you to break your Windows Form UI into a grid layout:
You drag controls to where you want them, moving them around until you have the layout you want.You can add, remove or change the location of the bars which form the cells inside the grid.As you alter the size of a cell that contains a control, so the contained control will change in size correspondingly.
In many situations, one C1Sizer docked to Fill the whole form will be all you need (which is what is demonstrated in the screenshot above).However while I was experimenting I also found that I had much better results if I didn’t use the standard Windows Forms Panels within a C1Sizer Grid to contain sub groups of controls.Simply using the SizerGrid itself as a kind of Super Panel was much better and was a habit I found it easy to adopt within a very short time.I simply placed other C1Sizers within the one which was Docked to fill the Form.The child C1Sizers could then be used in the same way as you would use a panel.A wheels-within-wheels kind of approach.In this way you have deeper levels of control when it comes to resizing options and also a range of methods,such as enumerating through all controls in a (child) Sizer, are available to you.
The downloadable PDF manual for this component is detailed and logically arranged with information for users at all levels.Even the basics are not overlooked, as for example right at the start of the manual they explain to the absolute beginner how to add a component to the Visual Studio toolbox.
The manual contains samples, a quick tutorial for the early stages, plus a comprehensive reference at the end which allows for the more seasoned developer to get right into the bones of it.
This really is a very useful component indeed.
C1 Spell and Thesaurus
I decided to try out another helper type of component next and this time it was the Spell component.To be honest, I didn’t expect to be much impressed with C1Spell as I had found in the past that wiring my apps up to the spell-check features in MS Office was the answer to my basic needs in this area.
But the key word in that last sentence is “basic”.The methods and facilities available in this component go way beyond what the average developer will achieve by simply wiring up to the standard MS Office Spellcheck.If you need detailed control of the spellcheck processes and user interaction then C1Spell will be your tool of choice.
The Spellchecker can be configured to check as the user types or can be run on a previously designated event, such as a button click or a when a control loses focus.
The following screenshot demonstrates three of the ways you can utilise this package:
You can use the dictionary that comes with the package or replace it with one of your own.I tried out the MS Office user dictionary from my own PC and it worked perfectly.
I was interested to read that ComponentOne offer a utility app to make it easy to create your own custom dictionaries from scratch (something I had had to wrestle with via MS Office in a VB.NET application a while ago).However I couldn’t find it initially, but once again a quick query to the Help Centre and the answer was supplied.(It’s accessed via the Start-Program menu in Windows, not in Visual Studio itself)
There are many other features, apart from the obvious core function of checking for incorrect spelling.To give you an idea of the depth of control on offer, here’s the CaretPosX Property
Returns the horizontal position of the caret on the edit window linked to the C1Spell component.
Public ReadOnly Property CaretPosX As Long
And if – like me – you began by wondering why you would ever want to know the value of this particular property, the help documentation gives us an example:
The caret position is returned in screen coordinates and expressed in twips.
This property is useful if you want to position user-interface elements such as pop-up menus or forms next to an offending word while spell checking. For example, to display a pop-up menu with a list of words, you would write code such as:
Dim pos As Point
Dim x, y
x = C1Spell1.CaretPosX
y = C1Spell1.CaretPosY
pos = New Point(x, y)
pos = TextBox1.PointToClient(Me.mPopup.Show(TextBox1, pos)
The C1Spell component also includes a Thesaurus facility.I didn’t test this in depth but did enough to confirm that it functions as you would expect.
All in all, a surprisingly useful utility component.
C1 Print and Print Preview
Moving up the range into one of the more heavy duty components, I next looked at Preview and Print.
There is so much functionality crammed into the Preview and Print components that it takes a while to get to grips with them fully. The PDF manual for this component alone, for example, is over 700 pages long; that’s larger than many VB.NET books.
Take a look at the diagram below, for instance, which shows the range of choices available simply for formatting Tables via the C1Print component.
Impressive though this level of functionality is, it can at times become a bit mind swamping. In this particular case I did find that I had to spend quite a lot of time navigating round the various kinds of help. The fact that I was using VS2005 and therefore the 2005 versions of the C1 components sometimes caused me problems. The downloadable samples, which I turned to for help when I got too bogged down were formatted for VS2003 and the C1 2003 versions of the components.
In the end I found that the most straightforward way of navigating to the most appropriate source of help was to go to the ComponentOne HelpCentral pages and work through the online samples and demos displayed there.
I have to confess that I did struggle to get to grips with this component. The vast range of subsets meant that it took a lot of effort to master the details needed for everything to function exactly as you want. However it would be harsh to criticise ComponentOne for including such a comprehensive range. As I mastered some of the various elements, it became a very useful tool indeed. The range of subcomponents includes a Preview Pane, Text Search Panel and Preview Thumbnail View, to name but three of them.
One rather disconcerting aspect that confused me for a while was that the C1PrintPreview component is shown in the Toolbox by that name, but it magically transmogrifies into C1PrintPrintDocument1 when you drag it on to a form.
What makes things rather more difficult is that the ComponentOne Toolbox shown also contains a different component which is actually named C1PrintDocument (but which has different properties and methods).
I did query this with the team at ComponentOne and they assured me that this was intentional. It’s not a big problem and – like so many things – not a problem at all once you know about it, but it is the kind of thing that goes to make a seemingly easy process into a more confusing one for the beginner. That being said, I’m quite prepared to believe that my problems may well lie with my unfamiliarity with document handling in VB.NET in general.
I wouldn’t want those comments to detract too much from the fact that once again this is a useful and powerful productivity enhancing tool.
C1 Bar Code
This specialised little component will be handy if you have an application that needs to display bar codes . With the component added to your toolbox, all you need do is set the barcode format you want to use and feed in the value that you want to be shown as a bar code . It quite literally couldn’t be easier
Various industry standard Bar Code formats can be created
If you have a need to create (and optionally transfer or print out) bar codes then this small component makes it very easy.
Components Not Reviewed
I would have liked to have included reviews of many more of the components in detail, but time, tide and the next project wait for no man, so I’ve only been able to scratch the surface of the available range of the whole package. However, when I come to use some of the others in projects – as I am 100% certain that I will – I hope to be able to update the detailed review sections to include those.
Particularly impressive in the various demos available from ComponentOne was the FlexGrid with its Cell Notes, Rich Text Formatting and Hierarchical Views, pleasingly presented using Skins. In addition to the standard narrative forms of help, both the FlexGrid and TrueDBGrid feature in an online demonstration video which will give you some idea of the scope and features of these two components.
You can see excellent examples of combinations of many of the Studio Enterprise components in the freely downloadable Starter Kit:
At the time of writing (early March 2006) the excellent Starter Kit is currently only available using the 2003 components set and comes with source code in C#.
This can be a bit of a problem if you want to analyse the details of the code used in the demonstration and your C# skills are a bit basic. With free C# to VB translation web sites only the click of a browser button away, this again is not an insurmountable problem.
The good news from ComponentOne is in response to many requests for the VB source, they plan to release it soon. This will be part of the new VS2005 version of the Starter Kit (a MS Movie Starter Kit Extension) mentioned earlier.
I should also mention that all the other on line and PDF samples and demos currently available that I saw had both C# and VB sample code available already.
Web, Classic VB and Mobile App Developers will probably have noticed a total absence of mention of the components in those areas. In reality, I have only had time to review the Studio for .NET element of the total package. I will try and cover some of the other Studios in updates to this article. As you will see mentioned elsewhere, each of the sub-packages of Studios are available separately, in addition to the all-in-one Studio Enterprise edition
You can see there is a wide range of pricing options from the ComponentOne Store . Support subscriptions, upgrades, the complete Enterprise Studio or specific individual Studios for .NET, ASP.NET, etc, on CD or download
And you can of course also purchase some or any of the individual components. As you will see from the price list, if you are going to buy two or more then in almost all cases you will get much more bang (or components!) for your buck if you go for one of the Studio packages or even the whole Enterprise edition. You will effectively get twenty or more additional components for no extra outlay. (that's certainly an improvement on the standard "Buy one, get one free" deal!)
I tried out some of the Studio for .NET components in detail, briefly tinkered with others, and looked at length at many of those which were fully demonstrated in the samples, videos and demo executables. It is difficult not to be impressed by the sheer scale and range of the offering in the Studio Enterprise package. The smaller components do their job easily and intuitively; the higher end ones, while requiring more effort to master, bring a comprehensive range of facilities right to your fingertips
In my opinion this an excellent product. It is obvious that many man-hours (sorry, person-hours!) of effort have gone into creating this package and its associated help files. Of course, as always, there’s the odd glitch in the documentation and the occasional small fiddly thing to make setting up the demos frustrating, but overall this is a tremendously useful productivity package which would save an individual or a team a huge amount of development time.
All the components are downloadable on a trial basis from the ComponentOne Home Page, fully functional but with the expected nag screen when used. I recommend that you give at least some of them a try. I’ve tried to avoid using this tired old cliché so far, but actually it probably is true: in this package there is something for everyone.