Archive for the ‘Delphi’ Category.

Visual Forms 2.0.1 – Delphi XE

A new update to Visual Forms has been released. The update is for all supported IDE Versions.

Registered users should have received the necessary details yesterday. If not, please let me know.

This new update includes support for Delphi XE, IDE Logging and also Updating of Localisations within the options screen.

Due to an enhancement in the OTAPI for Delphi XE, the Visual Forms Options dialog has been replaced and options are now accessible in the Tools | Options dialog. You can still get to the options using the Options menu item in the Visual Forms sub menu and the toolbar button (although that might disappear in a future version now).

The option pages appear under a Third Party node. While it is possible to place your option pages elsewhere - most will be best suited to this new location.

The JED Software company page is just filling space at the moment. There will be some additional details coming to that page in future.

JED Software Options Page

JED Software Options Page

Visual Forms About Options Page

Visual Forms About Options Page

Visual Forms General Options Page

Visual Forms General Options Page

JSDialog Pack 2.0.001

A new version of JSDialog Pack is now available. Users with valid maintenance should have already received their copy a few weeks ago.

More details can be found on the website: http://www.jed-software.com/.

QC Plus 1.1

A new version of QC Plus is now available for download.

I suggest you have a read through the “What’s Changed” document.
Download

Visual Forms 2.0 Features #2 (Enhanced View Units dialog)

Visual Forms 2.0 includes a replacement for the existing View Units dialog.

In more recent Delphi releases, the View Units dialog has seen some enhancements. What Visual Forms does is expand on these recent enhancements (there is no loss in current functionality) and then raises the bar a couple of notches.

Here is a screen capture from the Delphi 2007 version of the View Units dialog.

View Units - Delphi 2007

Here is the Visual Forms 2.0 version of the View Units dialog.

View Units - Visual Forms

Visual Forms has also taken over the Ctrl+F12 shortcut used for this dialog.

View Units - Visual Forms Menu Item

Apart from the obvious enhancements (it shows a preview of the form in the dialog while navigating it), it also supports sub string filtering and being able to display units across all files in the current project group.

Sub String Filtering

The sub string filtering is really the killer feature here and it doesn’t exist in ANY of the current Delphi versions.

View a short video (20 seconds) of the feature in action.

This feature came in very handy recently when I knew I had to make a change to an “attachment” form in QC Plus but couldn’t recall the unit name. Typing and looking at the form previews saved we valuable time.

Support for all Delphi versions

This feature is available for all versions of Delphi that Visual Forms 2.0 supports. This means Delphi 5 to Delphi 2010 (except Delphi 8).

Future Visual Forms versions will see this new feature improved significantly. That is why there is a blank space to the right of the search box!

Snag It 10

Has anyone else recently upgraded to Snag It version 10 and noticed that most times a TButton won’t capture correctly. Look at the OK button in the first capture. The finally provide transparency and fix the zoom bug, but unfortunately capturing a button is now hit or miss.

Visual Forms 2.0 Features #1 (Replacement Captures)

This is the first in a series of post that will highlight the new features found in Visual Forms 2.0.

Support Replacement Captures in all IDE Versions

This feature first appeared in the Delphi 2009 release and then the Delphi 2010 release. It has now filtered down to support all IDE versions and has also been enhanced.
Replacement Captures is a feature that allows you to replace a captured form with an alternate image.

Some reasons why you might want to replace an automatically captured form with a different image:

  • You create your form content dynamically.
  • You use visual inheritence and the form doesn’t change much through each inheritance layer.
  • You want a form to be more prominent in the viewer.

How to replace the default capture

  1. To create a replacement take a screen capture of the image you want to replace the default capture with. There needs to be an image on the clipboard before the Replace command items are enabled.
  2. Select the default capture in the Visual Forms viewer to replace.
  3. Visual Forms 2.0

  4. Choose the Replace… menu item from either the Refresh drop down menu on the toolbar or from the viewers context menu.
  5. Visual Forms 2.0

  6. The image on the clipboard is displayed. To use the image displayed, click on the OK button.
  7. Visual Forms 2.0
     

When you have replacement forms in the current project you can identify them easy because a small yellow star is painted over the capture in the top left hand corner in the viewer.

Visual Forms 2.0

If refreshing your captures (using Refresh All) and you have replacements active, you are prompted on what to do about your replacement captures. You can choose to override any replacements or keep them.

Visual Forms 2.0

Likewise if you refresh a capture that is a replacement, you will be prompted before the replacement is overwritten.

You can also clear all of the replacements used in your project by using the Clear Replacements button available in the Options | Project section. The project section is only visible when there is a current Visual Forms enabled project opened in the IDE.

Visual Forms 2.0

These captures were created using the Delphi 2007 version of Visual Forms running under Vista.

Visual Forms: Version 2 Now Available

Last week saw the release of Visual Forms version 2.

The new release has a number of enhancements and over the next few days I’ll highlight these enhancements on the blog. There is also some additional information available on the Visual Forms product page (www.jed-software.com/vf.htm) and also some updated screenshots on the screenshots page (www.jed-software.com/vf_screen.htm).

Users with valid maintenance have already received the new version, existing users just need to purchase maintenance and the new version will be sent to them.

This update enhances all supported IDE versions (Delphi 5 – Delphi 2010).

VCL Ribbon – Ribbon Group Component Editor

I’ve created a component editor specifically for the TRibbonGroup component. With this component editor it will hopefully make it a little easier to layout your ribbon groups.

It has a number of commands for adding controls to the group as well as changing the alignment and vertical row count for the group.

Download

Delphi 2010 version

Delphi 2009 version

Install

  1. Open up your Delphi version.
  2. Select the Components | Install Packages menu item.
  3. Click on the Add button and select the extracted BPL from the downloaded zip file.

The component editor should now be available when you click on a group on the ribbon.

Some screen captures

Available commands for the Component Editor

Available commands for the Component Editor

When you select a command, you can also choose what actions to create as that command.

When you select a command, you can also choose what actions to create as that command.

You can create the different types of Small and Large buttons. NOTE: Selecting the dropdown button is a little different to the others.

You can create the different types of Small and Large buttons. NOTE: Selecting the dropdown button is a little different to the others.

When you are creating a dropdown button you are selecting that actions that should be added to the button as dropdown items. Only one button is created. You can also enter in the button caption.

When you are creating a dropdown button you are selecting that actions that should be added to the button as dropdown items. Only one button is created. You can also enter in the button caption.

VCL Ribbon – Context Tabs

Context Tabs was bought up in a comment to my MDI post.

I’ve been putting considerable effort into getting this working for one of my personal projects. I think it looks pretty good.

Design Time

Design Time

 

Runtime

Runtime

 

Runtime (second tab)

Runtime (second tab)

Unfortunately it isn’t viable to release these changes to the public. This just proves that it is possible though!

If you posted a comment on the previous post, I’ve responded to all comments now.

VCL Ribbon MDI Fix

Disclaimer: I wrote the VCL Ribbon implementation in Delphi 2009. At the time there was no scope for MDI support in the Ribbon however the number of posts about this issue made me look into fixing it. Today I set aside some time to look at a solution and I now present this solution.

The MDI Ribbon bug is evident when your application is a MDI application and the MDI Children are maximized. The screen capture below shows this bug.

VCL Ribbon MDI Bug

VCL Ribbon MDI Bug

The fix is to drop a new component onto the Form with the Ribbon on it. Then you just need to set the Ribbon property to be the TRibbon component on the form, that is all that needs to be done.

The screen shot below shows the component at design time.

VCL Ribbon MDI Bug Fix

VCL Ribbon MDI Bug Fix

When you toggle the Enable MDI Fix check box, you need to restore and maximum a MDI Child form. For real use, you wouldn’t want to disable it anyway.

Various screen captures of the demo application with the fix active.

Fixed Ribbon MDI Bug

Fixed Ribbon MDI Bug

Fixed Ribbon MDI Bug

Fixed Ribbon MDI Bug

Fixed Ribbon MDI Bug

Fixed Ribbon MDI Bug

 

Downloading the Fix

You can download the component and demo application from my site. I may also put the fix on CodeCentral in future.

Ribbon VCL MDI Bug Fix Download

To install the component into the IDE, open the RibbonMDIFix2010.dpk file in Delphi 2010 (should also work, but is untested). In the project manager, select the Install command. Make sure the path to the RibbonMDIFix.pas unit is on your library path so that the compiler can find the file when compiling your application.

 

Further Ribbon Details

If you search for my QualityCentral entries on the Ribbon, most of the issues I raise I also provide the workaround for. Most are simple changes that can be done by copying the Ribbon units into your project folder. IIRC none are interface breaking (I’ve saved those).

 

Performance issue with MDI Applications using the TActionManager framework

There is also an issue with the MDI “detection” when a TActionMainMenuBar component (and descendants) are used in an application. This is actually a bug that was raised with Borland/CodeGear support several years ago. When you have an action that calls GetActiveMDIChild you may see processor usage increase significantly. On the Window group in the application feature throughout this post you’ll see the Close button. This is the TWindowClose standard MDI action. This actions update handler calls ActiveMDIChild. If you are running an MDI application that utilises TActionManager CPU usage will increase because of this. This occurs because of the Window Hook installed for menu processing. It handles the WM_MDIGETACTIVE message, so if an action is calling that method, the window hook is also processing it.

My solution (which also uses a window hook) avoids increasing CPU usage unnecessarily by listening to more specific MDI messages. There is no need to listen to the WM_MDIGETACTIVE (that I can see).

Delphi 2010 Support

Delphi 2010 versions of Visual Forms and JSDialog Pack will be released within the week.
Some final testing and additional documentation is still required.

JSDialog Pack

The release for JSDialog Pack is a large update that adds many new features and abilities. It also sees the debut of a vastly improved help file and demos.

There were no code changes required for Delphi 2010 support so the current version will compile and run without error.

Visual Forms

The release for Visual Forms will just be a point release and only to add Delphi 2010 support. This is because Version 2 of Visual Forms is continuing in the background and isn’t quite ready for deployment. If you have feature requests – you have a little while before the new features phase is complete.

Delphi Configuration Manager

An updated version will be available mid to late September.