This is a scenario we see every week: a Visual Basic 6 application has been running in production for fifteen or twenty years, it is critical to the business — and its source code is gone. The contractor closed down, the developer's machine was wiped, or the .vbp and .frm files were sitting on a server that no longer exists. As long as you have the executable, not everything is lost.

What a VB6 .exe actually contains

A Visual Basic 6 executable is not a black box. It carries the description of its interface, its resources, its component references and its compiled logic. But those elements did not undergo the same treatment, and that is what determines what a recovery can give back.

What the binary kept

  • Forms, controls, menus, with their properties and layout
  • Embedded resources: images, icons, strings
  • Names of forms, controls and public procedures
  • References to COM, OCX and ActiveX components
  • Win32 API declarations: function name and library

What compilation removed

  • Local variable names
  • Names of private procedures and variables
  • Comments
  • Constants and enumerations, folded at compile time
  • Original indentation and formatting

In other words: your interface comes back as it was, and your logic comes back without its labels. That asymmetry is not a tooling shortcoming — it follows from how Visual Basic was built: the form designer and the Basic engine had separate origins, and the compiler does not treat them the same way.

First step: know what you are dealing with

Before anything else, determine whether your binary was compiled to P-Code or to native code. That governs everything that follows, and the answer is in the file — a field in the project description structures carries the compilation mode.

Native code is the more common case, for a simple reason: it was the compiler's default setting from Visual Basic 5 onwards. But both are encountered, and the distinction changes what you should expect. It is covered in detail in P-Code or native code: what your binary gives back.

If all you need is to read a portion of logic rather than rebuild a project, first check that a decompiler is the right tool: decompiler or disassembler.

The method

1 · DiagnoseOpen the binary and read its compilation mode, its forms and its resources. This step costs nothing and determines all the rest.
2 · Recover the interfaceRebuild the .frm, .ctl and .frx files. This is the most reliable part: you get your screens back as they were.
3 · Decompile the logicTranslate the instructions into readable Visual Basic. Never complete, but nothing like rewriting from scratch.
4 · Reassemble the projectCombine interface and code into a VB6 project you can open, compile and maintain.

What comes back, measured

We publish the decompiler's actual coverage rather than describing it. The rates below are established on a test bench of 207 programs, compiled to exercise the decompiler across the whole instruction set: 1,446 procedures and 11,836 decoded instructions. This corpus measures the tool's coverage, not the composition of the installed base.

P-Code instruction set recognised1,158 / 1,164  ·  99.5%
Runtime functions — native code291 / 347  ·  83.9%
Runtime functions — P-Code65 / 91  ·  71.4%

The detail is public, correspondence by correspondence: 1,153 documented correspondences, each with the original function or instruction and what is produced from it. So you can check what will be recognised in your case before buying.

Start with a free diagnosis

The free edition of VBReFormer opens your executable, identifies its compilation mode and shows you the recoverable interface and resources. You know exactly what is recoverable before committing to anything.

For what follows — native code decompilation and project reconstruction — VBReFormer covers the whole chain. And if your need is limited to changing the interface without rebuilding anything, that is possible directly in the binary.

Make sure you hold the rights to the application concerned — the most common case being the recovery of your own software.