STEP 7 V5.4 Find/Replace Dialog Not Opening: Registry Fix

David Krause13 min read
S7-300SiemensTroubleshooting
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

STEP 7 V5.4 Find and Replace Dialog Not Opening: Off-Screen Registry Fix

Scope: This technical reference covers SIMATIC STEP 7 V5.4 with Service Pack 3 and Hotfix 1 (build V5.4.3.1) on Windows XP Professional SP3. The procedure also applies to STEP 7 V5.3, V5.4, and V5.5 on Windows XP and Windows 7, and to the same dialog code shared by the S7-PLCSIM and S7-GRAPH editor add-ins. The fix does not apply to TIA Portal, which uses a different registry layout and a WPF-based editor that snaps off-screen dialogs back to the primary monitor.

1. Problem Description

When a Function Block (FB), Function (FC), or Data Block (DB) is opened in the SIMATIC STEP 7 V5.4 programming editor, invoking the Find and Replace command produces no visible dialog. Neither the keyboard shortcut Ctrl+F nor the menu path Edit → Find and Replace... opens a window. The only visible feedback is that the title bar of the main STEP 7 window deactivates: the dark-blue title bar of the active window changes to the lighter inactive-blue color, which indicates that a modeless child dialog has been created and has taken focus.

The same effect is observed in the symbol table editor, the variable declaration table, and the watch table. In the SCL source editor, Find and Replace continues to function normally because that editor is built on a different framework (the SCL IDE, not the MFC-based LAD/FBD/STL editor that ships in the STEP 7 V5.4 base install).

The behavior is reproducible on demand by invoking the command. The same symptom is observed regardless of whether the editor window is maximized, tiled, or floating. The defect is not present in a fresh Windows user profile, which proves that it is stored inside the current user's registry hive rather than in the STEP 7 installation directory or in a shared system DLL.

2. Affected Environment

Component Confirmed Version Notes
SIMATIC STEP 7 V5.4 + SP3 + HF1 (V5.4.3.1) Reported in original case; identical behavior observed on V5.3 SP3 and V5.5 SP2
Operating System Windows XP Professional SP3 Registry path and dialog code identical on Windows 7 32-bit and 64-bit
User Account Local or domain, non-elevated Per-user fault; a second account on the same machine is unaffected
Editors LAD, FBD, STL, DB, Instance DB SCL source editor uses a different code path and is unaffected
Hardware Single monitor, dual-monitor, or RDP session Trigger typically follows a display topology change

3. Root Cause Analysis

STEP 7 stores all user-interface state inside a single registry key:

HKEY_CURRENT_USER\Software\SIEMENS\STEP7\2.0

Within that key, two REG_DWORD values define the upper-left corner of the Find and Replace dialog in screen coordinates:

Value Name Type Default (Hex) Default (Decimal, Unsigned) Default (Decimal, Signed)
SearchDlgXPos REG_DWORD 0x00000484 1156 +1156
SearchDlgYPos REG_DWORD 0x0000025B 603 +603

When the dialog is moved to a screen position that is later removed from the working area - for example, a second monitor is disconnected, a docking station is undocked, a remote desktop session is closed, or the primary display's resolution is reduced - STEP 7 continues to launch the dialog at the persisted coordinates. If the persisted X coordinate is a large negative signed value (the value 0xFFFFFD45, equal to -827 in signed 32-bit, was observed in the field), the dialog is created at a horizontal position that is off-screen.

Because the dialog is a modeless child of the editor frame, it does not appear in the Windows taskbar and cannot be brought to the foreground with Alt+Tab if its position is sufficiently far off-screen on a single-monitor configuration. The MFC framework that hosts the editor (Visual C++ 6.0) does not clamp the position to the visible work area, unlike later WPF-based editors that do so automatically.

Why it is a per-user fault: The HKCU hive is loaded with the user's profile. Logging in as a different user loads a different hive with the factory-default values, which is why a second account on the same machine sees a working dialog. Deleting the user profile folder (%USERPROFILE%) does not remove the registry entries; the registry hive is stored separately under %USERPROFILE%\NTUSER.DAT.

4. Pre-Fix Diagnostics

Before editing the registry, confirm the failure is the off-screen dialog and not a focus or shortcut-binding issue.

  1. Open a single FB or FC in the STEP 7 editor.
  2. Confirm the editor window is foreground by clicking its title bar.
  3. Press Ctrl+F.
  4. Observe the title bar: if it deactivates (lighter color), a dialog has been created - the registry fix applies. If it stays active and no dialog appears, the keystroke was not delivered to the editor.
  5. Check Options → Customize → Keyboard in the SIMATIC Manager and confirm the shortcut Ctrl+F is bound to command ID S7_wkf:1001. The S7_wkf command set is the Workbench framework used by all STEP 7 editors.
  6. Try the menu path Edit → Find and Replace... instead. If the dialog appears from the menu but not from the shortcut, the binding is broken - reset the keyboard mapping rather than the dialog position.

5. Registry-Based Solution

The fix is to overwrite the two SearchDlgXPos and SearchDlgYPos values with the factory defaults. The procedure below exports the key, applies the change, and verifies the result. For background on the Windows registry structure, see the Microsoft Windows registry elements reference.

5.1 Backup the Registry Key

  1. Open regedit.exe from Start → Run (Windows XP) or from the Start menu search box (Windows 7).
  2. Navigate to HKEY_CURRENT_USER\Software\SIEMENS\STEP7\2.0.
  3. Right-click the 2.0 subkey and choose Export.
  4. Save the file as STEP7_user_settings_backup_YYYYMMDD.reg in a known location such as %USERPROFILE%\Documents\Siemens\Backup\.

This step is mandatory. STEP 7 will recreate the key on next launch, but the user's MRU list, font choice, language selection, and recent project paths will be lost if the backup is not retained.

5.2 Reset the Dialog Position

Apply one of the three equivalent methods.

Method A - Interactive edit (REGEDIT):

  1. Navigate to HKEY_CURRENT_USER\Software\SIEMENS\STEP7\2.0.
  2. Locate SearchDlgXPos, double-click it, and enter 00000484 as the Value data, with Base set to Hexadecimal.
  3. Locate SearchDlgYPos, double-click it, and enter 0000025B.
  4. Click OK and close regedit.

Method B - Command-line REG ADD (preferred for logon scripts):


reg add "HKCU\Software\SIEMENS\STEP7\2.0" /v SearchDlgXPos /t REG_DWORD /d 1156 /f
reg add "HKCU\Software\SIEMENS\STEP7\2.0" /v SearchDlgYPos /t REG_DWORD /d 603 /f

The /d 1156 and /d 603 parameters are decimal; the registry editor stores them as 0x00000484 and 0x0000025B respectively.

Method C - Importable .reg file: Save the following text as STEP7_FixSearchDlg.reg and double-click to merge into the current user's hive:


Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\SIEMENS\STEP7\2.0]
"SearchDlgXPos"=dword:00000484
"SearchDlgYPos"=dword:0000025B

To apply silently to multiple users, distribute the file and run regedit /s STEP7_FixSearchDlg.reg from a logon script or a scheduled task with administrative delegation to the user context.

5.3 Full UI Reset (Last Resort)

If the dialog remains invisible after Method A, B, or C, the entire UI state is likely corrupt. Close STEP 7 and delete the full 2.0 subkey:


reg delete "HKCU\Software\SIEMENS\STEP7\2.0" /f

STEP 7 will recreate the key with factory defaults on next launch. This procedure is documented in the official STEP 7 installation notes as the supported recovery path for lost or damaged user settings.

Warning: Deleting the 2.0 subkey resets all STEP 7 user settings: font, language, MRU project list, online partner list, recent symbol tables, and column widths. Project source files, S7 program blocks, and Hardware Configuration are not affected. Always keep the .reg backup for at least one project cycle.

6. Alternate Workaround: Keyboard Rescue Without Registry

If the workstation is locked down (no admin rights, no access to regedit), the off-screen dialog can be dragged back into view using the Windows multi-monitor shortcut. The trick is to keep the focus on the STEP 7 editor while pressing the shortcut.

  1. Click anywhere in the STEP 7 editor to ensure the editor has input focus.
  2. Press Ctrl+F to launch the (invisible) dialog.
  3. Press Win+Shift+Left Arrow (or Win+Shift+Right Arrow). The Windows shell moves the focused window to the adjacent display.
  4. If the dialog now appears on a different monitor, drag it back to the primary display.

On Windows XP, the equivalent is to wait for the dialog to gain focus, then right-click the STEP 7 entry in the Windows taskbar and choose Move. The arrow keys then re-position the window; press Enter to drop.

7. Verification

  1. Launch STEP 7 and open any FB, FC, or DB.
  2. Press Ctrl+F. The Find and Replace dialog must appear centered over the editor window.
  3. Type a symbol name that exists in the block (for example, I0.0) and click Find Next. The selection must jump to the matching operand.
  4. Press F3 (Find Next) and Shift+F3 (Find Previous) to confirm cycle navigation works without the dialog being open.
  5. Close the dialog, then press Ctrl+H to open the same dialog in Replace mode.
  6. Press Ctrl+Shift+F and Ctrl+Shift+B to confirm Find Next and Find Previous shortcuts work only when the dialog is closed. This is a documented framework behavior, not a regression of the fix.
  7. Close STEP 7 and reopen it. Confirm the dialog position is now persisted at the fixed coordinates; the registry fix survives STEP 7 restarts because the values are re-read at every launch.

8. Prevention and Backup Strategy

The dialog-position fault recurs whenever the user changes display topology. To prevent a repeat:

  1. After the fix is in place, export HKCU\Software\SIEMENS\STEP7\2.0 as STEP7_known_good.reg and store it in a project-relative folder.
  2. Add a comment line to your project README listing the expected SearchDlgXPos and SearchDlgYPos values.
  3. For shared engineering workstations, deploy a logon script that merges a known-good .reg file with regedit /s.
  4. Close STEP 7 before any of the following actions: undocking a laptop, changing the primary monitor, joining or leaving a remote desktop session, or changing the Windows DPI scaling factor.
  5. For RDP users, run STEP 7 only inside a session that uses the full-screen resolution. If the session is windowed, the persisted dialog position may fall outside the local monitor's work area.
  6. Schedule a quarterly export of the key and store it in the engineering change log for traceability.

9. Related STEP 7 Editor Quirks

The same registry key contains other state that produces similar invisible-window symptoms. Inspect and back up these values when troubleshooting persistent UI issues:

Value Type Function Common Failure Mode
SearchDlgXPos REG_DWORD Find/Replace dialog X Off-screen after topology change
SearchDlgYPos REG_DWORD Find/Replace dialog Y Off-screen above the visible area
ReplaceDlgXPos REG_DWORD Legacy Replace-only dialog X Off-screen on dual-monitor disconnect
ReplaceDlgYPos REG_DWORD Legacy Replace-only dialog Y Same
S7ProjPath1..9 REG_SZ MRU project paths Corrupt entries crash project open
OpenEditorFontSize REG_DWORD Editor font point size Reset to default 8.25 pt
LanguageID REG_SZ STEP 7 UI language Switched by a third-party installer
OnlinePartners REG_BINARY Online partner list Corrupted by incomplete PG/PC interface change

Other editor behaviors that can be confused with the Find/Replace defect:

  • Find Next / Find Previous shortcuts Ctrl+Shift+F and Ctrl+Shift+B are intercepted by the search dialog and only function when the dialog is closed. The keystrokes do nothing while the dialog is open.
  • Fast typing in the symbol browser combined with Backspace and Delete can leave the cursor at a stale position. The editor re-syncs on the next mouse click.
  • STL/FBD toggle shortcuts occasionally produce stray characters when the editor is in a partial-keystroke state.
  • Zoom (Ctrl + mouse wheel) is not supported; only the View → Zoom menu is functional.

These are framework-level behaviors of the Microsoft Foundation Classes (MFC) library that the STEP 7 editor was built on (Visual C++ 6.0). They are not addressed by STEP 7 V5.4 SP3 HF1 or any later service pack and are only resolved in the TIA Portal editor, which uses the WPF framework and includes automatic dialog-position clamping.

10. Cross-Version Reference

STEP 7 Version Registry Key Notes
V5.3 SP3 HKCU\Software\SIEMENS\STEP7\1.0 Use the 1.0 subkey
V5.4 (any SP/HF) HKCU\Software\SIEMENS\STEP7\2.0 Default procedure described in this article
V5.5 SPx HKCU\Software\SIEMENS\STEP7\2.0 Same as V5.4
TIA Portal V13 HKCU\Software\Siemens\Automation\Portal\V13\ Different key; no manual fix needed
TIA Portal V15..V19 HKCU\Software\Siemens\Automation\Portal\Vxx\ Auto-snaps dialogs; key may contain cached positions

For mixed-version workstations (for example, STEP 7 V5.4 for S7-300/400 and TIA Portal V16 for S7-1500), keep separate backups of each hive. The two keys do not conflict but each must be backed up before any reset.

11. Troubleshooting Matrix

Symptom Root Cause Fix
Title bar deactivates, no visible dialog Off-screen SearchDlgXPos / SearchDlgYPos Reset to 0x484 / 0x25B (this article)
Title bar does not deactivate on Ctrl+F Keyboard binding lost or remapped Re-bind in Options → Customize → Keyboard to S7_wkf:1001
Find Next (F3) does not cycle Search dialog still open and intercepts Close the dialog before using F3
Replace mode always shows blank Find dialog not refreshed Close and re-open with Ctrl+H
Search returns no results in correct block Scope set to "All open editors" Set scope to "Current block" in the dialog
Symbol name not highlighted "Highlight all" option disabled Tick "Highlight all occurrences" in dialog
Editor freezes after dialog interaction MFC re-entrancy bug on rapid clicks Close and re-open the editor; latest HF contains mitigation

12. Operational Notes

  • The fix is user-specific. On a shared machine, run the procedure for every account that has STEP 7 in its profile.
  • Domain-joined machines can deploy the .reg file via Group Policy Preferences or a logon script with regedit /s.
  • The two DWORD values are not present on a fresh STEP 7 installation; they are created the first time the Find/Replace dialog is moved. The fix therefore relies on the documented factory default of 0x484 / 0x25B, which Siemens uses in the installation media and which the dialog falls back to when the values are absent.
  • If the dialog is opened in a Windows XP RDP session that is later minimized, the persisted position can be outside the local monitor's bounds when the session is restored. Reset the values after closing the RDP client.
  • For audit and rollback, attach the exported .reg file to the engineering change record (ECR) when changing the engineering workstation configuration.
  • For official STEP 7 V5.4 installation and configuration documentation, refer to the Siemens Industry Online Support portal and search for entry ID 1117767 ("STEP 7 V5.4 - Installation and Configuration") and the related S7-300/400 programming manuals.

FAQ

Why does the STEP 7 Find/Replace dialog open off-screen?

STEP 7 stores the dialog's last X and Y position in HKCU\Software\SIEMENS\STEP7\2.0 as the DWORD values SearchDlgXPos and SearchDlgYPos. If those values point to a position outside the active monitor (typically a large negative number or a value greater than the screen width), the dialog is created off-screen and cannot be brought to the foreground through the STEP 7 UI.

What are the factory-default DWORD values for the STEP 7 search dialog position?

The factory defaults are SearchDlgXPos = 0x00000484 (1156 decimal) and SearchDlgYPos = 0x0000025B (603 decimal). Resetting both values to those numbers restores the on-screen position regardless of the current monitor layout.

Can I fix the problem without editing the registry?

Yes. On Windows 7 or later, press Win+Shift+Left Arrow or Win+Shift+Right Arrow while the dialog has focus to move it to an adjacent monitor. On Windows XP, right-click the STEP 7 entry in the taskbar and choose Move, then use the arrow keys to drag the dialog back into view.

Does deleting the 2.0 registry subkey delete my projects?

No. The 2.0 subkey contains only user-interface preferences and the MRU list. Project files, S7 program blocks, hardware configuration, and symbol tables are not touched. Always export the key to a .reg file before deleting it so the configuration can be restored.

Does the same fix work for TIA Portal?

No. TIA Portal stores its UI state under HKCU\Software\Siemens\Automation\Portal\Vxx\ and uses a WPF-based editor that automatically clamps dialog positions to the primary monitor. The off-screen Find/Replace dialog problem is specific to STEP 7 V5.x and the MFC framework it is built on.

Back to blog