It often happens that a company needs to modify a Visual Basic 6 application whose source code is lost: fix a piece of text, replace a logo, adjust a window. Without the original .frm and .vbp files the task looks impossible. It is not — and the reason says a great deal about how Visual Basic was built.
Why it is possible
A Visual Basic 6 executable does not contain one homogeneous block. The logic in it is compiled — translated into P-Code or machine instructions — but the interface is not compiled at all: it is described. Forms, controls, properties and resources are stored as structured data that the runtime reads at startup to build the windows.
And what is described can be read back, and therefore rewritten. That is the direct legacy of the language's origin: the form designer and the Basic engine were two separate projects, welded together in 1991, and the compiler never treated them the same way.
The design edition mode
VBReFormer opens the executable, rebuilds the tree of forms and their controls, lets you modify their visual properties, then writes the binary back. No recompilation, no VB6 environment to reconstitute.
This is in fact the product's original function. On its oldest archived page, in October 2002, VBReFormer described itself in exactly these terms: a "semi-decompiler for recreating the visual side of a Visual Basic project". Interface editing is not a feature added later; it is the starting point.
The boundary: what is reachable and what is not
The distinction is not a tool limitation, it is the same one as in the previous paragraph. Everything that is described can be modified; everything that is compiled needs something else.
Editable in the binary
- Labels, window titles, button captions
- Images, icons and embedded resources (
.frx) - Position, size and properties of controls
- Colours, fonts and visual attributes of forms
- Menu entries
Beyond the reach of interface editing
- A calculation, a condition, a business rule
- The body of an event handler
- A query, a file format, a protocol
- Any behaviour, as opposed to any appearance
When editing is enough, when you need to decompile
Many requests that look as though they require a full code recovery do not. It is worth checking before committing to a decompilation.
The most common case
An internal application still in daily use, whose vendor has disappeared and whose source was never archived. The company changes its name, or a legal notice becomes obsolete, and a single label blocks an entire department. That is the scenario we are sent most often, and it is precisely the one binary editing settles outright.
The rest — full project reconstruction, decompilation of the logic — is a different job, whose actual coverage is published with its denominators: 1,153 documented correspondences. And if you are still unsure what kind of need you have, decompiler or disassembler answers the question that comes before.
Start by opening your binary
The free edition of VBReFormer opens the executable and shows you the tree of forms, the controls and the resources. You immediately know whether your change is within reach of interface editing.
Always make sure you hold the necessary rights to the application you are modifying.