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
- 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.
- Select the default capture in the Visual Forms viewer to replace.
- Choose the Replace… menu item from either the Refresh drop down menu on the toolbar or from the viewers context menu.
- The image on the clipboard is displayed. To use the image displayed, click on the OK button.



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.

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.

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.

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