Hello friends,
I’d like to share a small but very practical idea that could greatly simplify support and debugging in FiveWin/Harbour applications.
The idea
Add a support-only feature at the control or base class level:
Hold a key combination (e.g. Ctrl + Alt)
Click on any control
A MsgInfo() pops up showing where you are in the code:
MsgInfo( ProcName() + " " + Str( ProcLine() ) )
Optionally, the dialog could also show:
Class name
Control name
Window title
How it would work (conceptually)
The logic can be placed centrally, for example in a base class like TControl or TWindow:
Detect a key combination:
GetKeyState( VK_CONTROL ) .AND. GetKeyState( VK_MENU ) // Alt
Intercept the mouse click (LButtonDown, bLClicked, or HandleEvent).
If the support key combo is active, show the info and skip normal processing.
Why this is extremely useful for support
When a customer calls support, instead of saying
“I clicked somewhere on the screen…”
you can say:
“Please hold Ctrl + Alt and click on the field.”
The customer reads out something like:
EDITCUSTOMER 1234
And the support developer immediately knows:
the PRG
the exact line number
the class / control involved
No screenshots, no guessing, no back-and-forth.
Safety / production use
This can be made completely optional and safe:
Enabled only in support mode
Enabled only for certain users
Enabled only if a flag or INI file exists
When disabled, the application behaves exactly as before.
Summary
100 % doable
Clean to implement at class level
No impact on business logic
Huge benefit for real-world support
I’d be very interested to hear if others have implemented something similar—or what you think about this approach.
Best regards,
Otto