# Visual Form Reconstruction - VB6, Windows Forms, and WPF

> Inspect recovered VB5/6 forms, .NET Windows Forms, and WPF BAML interfaces. Navigate from recovered events to handler code and understand reconstruction limits.

Canonical HTML: <https://www.vb-decompiler.org/help/visual_form_reconstruction.htm>

## Visual form reconstruction

The **Designer (read only)** tab displays a visual reconstruction of supported interfaces from the analyzed binary. It helps connect interface elements with application behavior without manually interpreting every recovered property or initialization statement.

### Opening a recovered form

1. Open the application and let VB Decompiler recover its project structure.

2. Select a recovered form in Solution explorer and open **Designer (read only)**.

3. Select a control to inspect its available properties and recovered event information. Use the events to navigate to the corresponding handler code.

The preview is reconstructed from stored information. It is not a running instance of the original interface. Unsupported controls, runtime-created content, missing resources, and custom layout logic can produce incomplete or approximate results.

### Visual Basic 5.0/6.0

The viewer reconstructs forms and UserControls, including supported control properties, fonts, colors, and images. It reads binary form data used by lists, combo boxes, and other controls. Images can include icons, cursors, bitmaps, JPEG, PNG, and GIF data.

Visual menu reconstruction supports both P-Code and Native Code applications. Supported controls include `SSTab`, `MSComctlLib.StatusBar`, `MSComctlLib.ListView`, `MSComctlLib.ProgressBar`, and `MSComctlLib.TreeView`.

To inspect a classic VB control's handler, select the control and double-click its **_Event** field in the property list. Choose the required event from the resulting list to open the handler.

![Recovered VB6 form with tabs, common controls, status information, and progress display](https://www.vb-decompiler.org/image/vb_decompiler_265/vb_decompiler_265_vb6_controls.png)

### .NET Windows Forms

VB Decompiler statically analyzes `InitializeComponent` and reconstructs supported Windows Forms controls and their layout. The parser and renderer do not require the .NET runtime or execution of the target application. Supported recovered images can also be displayed on controls and form backgrounds.

Select a control to inspect its recovered events, then double-click an event to open the corresponding handler. The viewer reconstructs menu and context-menu hierarchies; clicking a recovered menu item opens its corresponding Click event. Custom Windows Forms events are shown with an **@** prefix.

The viewer handles control Z-order, inherited foreground and background colors, `Color.FromArgb` values, numeric `FontStyle` flags, Boolean resource properties, and `MinimumSize` alongside `ClientSize`.

![Windows Forms preview showing a reconstructed menu and recovered standard and custom events](https://www.vb-decompiler.org/image/vb_decompiler_265/vb_decompiler_265_winforms_events.png)

### WPF windows, pages, and user controls

The viewer reconstructs supported WPF windows, pages, and user controls from compiled XAML resources stored as **BAML**.

![WPF window reconstructed from compiled BAML resources](https://www.vb-decompiler.org/image/vb_decompiler_265/vb_decompiler_265_wpf_overview.png)

Supported layout containers include **Grid** with fixed, Auto, and proportional (*) row and column sizes, **StackPanel**, **DockPanel**, and **Canvas**, including nested layouts. Reconstruction takes supported sizes, margins, padding, alignment, orientation, docking, and Grid spans into account.

Beyond common input controls, the viewer can reconstruct tabs, group boxes, expanders, menu hierarchies and separators, status bars, ListView columns and supported static data, static TreeView nodes, and static combo box items. Ribbon interfaces, navigation panes, and docked panels can have simplified representations.

Where resource data is available, the viewer recovers names, visible text, tooltips, fonts, background colors, enabled and visibility states, and embedded images, including supported PNG transparency and background opacity. Unsupported custom controls can appear as placeholders identifying the original WPF type.

The WPF viewer links recovered control events to their handlers. Use the event information in the visual viewer to open the corresponding decompiled code.

**Reconstruction limits:** the visual preview is approximate. Templates, styles, bindings, custom controls, and dynamically generated content may be represented partially.

### Inspecting and extracting form data

See [Forms](https://www.vb-decompiler.org/help/forms.htm) for the Show offsets setting and linked binary inspection. Use the [FRX Image Viewer plugin](https://www.vb-decompiler.org/help/plugins.htm) to inspect and export supported recovered image assets.
