The new vbAccelerator Site - more VB and .NET Code and Controls
 Headlines &nbsp

&nbsp 27 February 1999
&nbsp
&nbsp &nbsp Dev.X VB Zone Site of the week
vbAccelerator was the featured site of the week at DevX's VB Zone, the web-site of the VBPJ magazine.

&nbsp
&nbsp &nbsp Newsletter
&nbsp
&nbsp &nbsp You can now get notification of vbAccelerator's highly regular site updates through the Newsletter, produced in association with the VB Toolshed and Goffredo's Visual Basic Source Code Library. Find out about it and sign up in the Partners section.

&nbsp
&nbsp &nbsp Man Changes Programming Language Shock!
&nbsp
&nbsp &nbsp Also, at DevX, on 18 January, Bruce McKinney, author of Hardcore Visual Basic (probably the best VB coding book on sale), announced in an article that he was no longer going to write any more editions. At the same time he heretically announced that he would be doing future programming in Delphi because "VB makes the easy things easier; Delphi makes the hard things easier". There are a couple of upsides to this:
  1. Hardcore Visual Basic is now effectively a free product. The entire text of the book is available at MSDN and in the VB6 Help file (Bruce M says, not verified by me) and now for the first time you can also download all the source code for free also. This is a good thing. Go get it! Source code for both VB5 and a revised VB6 version is provided.
  2. If you're interested in VB, its problems, and some ideas of things to ask Microsoft for in VB7, then there is a lot of reading to be had!
vbAccelerator is not about to follow this lead. Obviously it would be far too difficult for a start (changing the domain name, redoing all the logos...) More seriously, VB still hasn't let me down yet. Yes, there are some issues with the VB language and a lack of support for many features we really should have. But there are plenty of workarounds and other times its good to have a the challenge :) One issue you can't help but agree with is the way VB6 has broken VB5 code without there being any real justification (for example, UserControls calling the Resize and ReadProperties events in the opposite order...). vbAccelerator is starting a new series of articles next month considering some of these issues. The initial articles are going to cover Implementing interfaces rather than using events and Can you create a control with a Toolbar style collection interface (and have it work)?

&nbsp
&nbsp &nbsp An Unpleasant Issue With the With Statement
&nbsp
&nbsp &nbsp The With statement in VB is a nice language feature which can make code easier to write and maintain. However, there's a big catch to it, pointed out in an article by Dave Jewell in the UK magazine PC Pro.

When you use With to refer to an object, VB will call the COM AddRef method on the object. Only when the End With statement is reached is COM's Release method called. This means that if you're code breaks out of a With...End With statement block for any reason, VB will have taken out a permanent reference on that object. Objects cannot clear up properly unless there are no outstanding references on them or when your executable terminates! This code fragment shows how you can get into serious difficulties with this:

   Dim c As cWorker
   Dim fResult As Double

   On Error Goto ErrorHandler

      Set c = MainObject.Worker(1)
      With c
         .Iterations = 1000
         .InitialValue = 3
         .ProgressLabel = lblStatus
         .DoProcess
         fResult = .Value
      End With

   ErrorHandler:
      LogError 2501,"Processing Failed: " & Err.Description

If for any reason the code raises an error during the With block above, the object c will never terminate whilst your project is running. It will just float somewhere around in memory until the project completes because of the outstanding reference. You can try to set c to nothing in the error handler, but this still won't terminate the object because the With block has taken out another reference on it!

Although this 'feature' is mentionned somewhere in the VB documentation it isn't particularly well known. The conclusion is that if you're using With...End With you better be very careful...

&nbsp
&nbsp &nbsp VB Source Book Project
&nbsp
&nbsp &nbsp This project aims to build a new freeware VB source code library to rival the expensive commercial versions out there. There are currently some 2000 source code snippets, controls, DLLs and some complete VB sites in the library. Send an email (VBSource@aztech.enta.net) if you'd like to help with testing some of the snippets.

&nbsp
&nbsp 10 January 1999
&nbsp
&nbsp &nbsp Version 2 of Icon Menu and Owner Draw Combo List controls
&nbsp
&nbsp &nbsp The January 1999 release of vbAccelerator brings with it major new versions of two of the highest profile controls on the site: the Icon Menu Control and the Owner-Draw Combo and List Box Control.

The Icon Menu Control gains many new features with this release: the ability to insert or remove menu items, making the control much easier to use, the ability to track menu items which have had the VB .Visible property set to False and also it is now capable of working in MDI projects with multiple child menus.

The Owner-Draw Combo and List Box control has not changed so much, but the changes that have been made approach the state-of-the-art in hardcore VB coding. The previous release of this control worked in most SDI applications, but it had a hacked implementation of focus which caused it to fail on MDI forms, and it sometimes caused GPFs. The new version overrides VB's implementation of focus for ActiveX controls by modifying the control's vtable to ensure absolutely correct focus implementation. Not just this but the only other outstanding bug, which was a failure to size correctly according to the selected font, has been fixed. The fixing in this control paves the way to the full implementation of ComboBoxEx, TreeView and ListView controls in VB for future releases of the site. Cool!

Oh, I can't leave it here without mentionning that the long-promised Goldfish application is now finally release and available for download.

&nbsp
&nbsp 7 January 1999
&nbsp
&nbsp &nbsp http://vbaccelerator.com Doesn't Exist?
&nbsp
&nbsp &nbsp Unfortunately vbaccelerator.com went down between 30 December and 5 January. This was caused by a problem at InterNIC who removed access for the domain name because they had unfortunately not worked through their forms in time.

As you can tell, we're now back up and running, but the domain is currently "on-hold" until InterNIC complete their bureaucracy, so there may well be another outage. Hopefully this time it won't occur in the middle of a major holiday when there is no-one to ask how to fix it!

Be assured, however, that vbAccelerator is not going away and I will do my utmost to ensure 100% service.

&nbsp
&nbsp 25 November 1998
&nbsp
&nbsp &nbsp vbAccelerator Gets a New ISP!
&nbsp
&nbsp &nbsp Today vbAccelerator has moved to its new address, http://vbaccelerator.com, and is now hosted by a new service provider. The new ISP gives vbAccelerator a much higher bandwidth and the speed is somewhat better! (Also we're no longer getting squeezed by every other free home page on Demon...) To celebrate the new site, there are 14 new source code articles this month including 2 new controls. Check it out!

My apologies to you for the sluggish and often non-existent performance at the previous site. If you've battled with "time-out", "document contains no data", "404 - page not found" and inability to download files, I sympathise.

Thanks to everyone who wrote in with offers of help - your offers were greatly appreciated.

&nbsp
&nbsp &nbsp vbAccelerator versus VB6
&nbsp
&nbsp &nbsp vbAccelerator does not yet own a copy of Visual Basic 6, so the code originated for this site isn't available as VB6 native executables. However, there should be no problem moving most of the code from VB5 to VB6. And since all the source code is provided on this site you can always recompile it yourself!

Please change any OCX or DLL names before recompiling in VB6 to prevent incompatibility. If you are feeling particularly public spirited, you could even post me the VB6 version! (as usual, other code, cash, cheques, cuddly toys etc will also be gratefully received :)

Here at vbAccelerator we're not too sure about VB6. There's some neat new extensions (WebClasses, DHTML forms, UDTs in ActiveX, lightweight controls, possibly the DTD stuff) but what happened to the all the great new hacking tools we could have had? Comparing this release to VB5 it seems that things aren't going forward in the right way.

Where are cool new features that would really make you want to program in VB like inheritance, proper multi-threading support, fixes to the dire collection object, easier subclassing, proper menu and toolbar integration, docking windows, more OLE type libraries and so on?

Some of the new VB6 features don't seem to be helpful either. The CallByName feature is flawed because it takes the simple option and thus requires a public object. Object persistance suffers in the same way. A potentially nice new feature is that you can create a control at run-time. But this has the same problem as VB5 does when you create an object that has events at runtime - you have to set up a withevents class at design time to intercept the events! Another issue is the completely new OCX implementations for COMCTL32.DLL. Why do we need a new incompatible OCX just to put in a few new features? Surely this isn't because otherwise VB5 programmers could use it? Also, the use of owner-draw in the new OCX version to create relatively useless features such as item colouration is seriously misguided (IMHO).

Compare this to the stuff that was added in VB5 (OCXs, AddressOf, Implements, ObjPtr, CopyMemory (?)...) and to me it seems that VB6 is a bum deal.

I'm sure I'm wrong about at least half of this. What do you think?

&nbsp
&nbsp 19 October 1998
&nbsp
&nbsp &nbsp A New Version of SSUBTMR.DLL
&nbsp
&nbsp &nbsp If you've been here before, you'll probably know that SSUBTMR.DLL is the sub-classing component at the heart of all my controls (if you haven't, check out Subclassing Without the Crashes). The rebar/toolbar control has exposed a bug in this component if used in combination with other Common Controls. Read about it and make sure you download the new version now if you're using my controls! The new version is binary compatible so it doesn't cause any install problems.
Thanks to Jim Parzych for noting this problem.

&nbsp
&nbsp


TopBack to top

HomeBack to Home

&nbsp
 

About  Contribute  Send Feedback  Privacy

Copyright © 1998-1999, Steve McMahon ( steve@vbaccelerator.com). All Rights Reserved.
Last updated: 27 August 1999