--------------------------------------------------------------------------------
[BUG/PRB.] VFP 9.0 FIX - THE SHORTCUT MENU IN THE PRINT PREVIEW WINDOW
October 2026
--------------------------------------------------------------------------------
CCB
1. THE ACCESS KEYS IN PRINT PREVIEW WINDOW (from dv_foxhelp9.chm):
Visual FoxPro Advanced (10.0.0.0) Language Reference.
Keyboard Shortcuts
Visual FoxPro supports keyboard shortcuts in these areas:
Browse window
Class Browser
Code window
Controls
Editor
Form Designer and Class Designer
Help
Menu commands
Print Preview window
Properties window
Report Designer and Label Designer
Window manipulation
Visual FoxPro supports the following keyboard shortcuts in Report Designer and Label Designer:
---------------------------------------------------------------------------------------------------------------
| Shortcut | Action |
---------------------------------------------------------------------------------------------------------------
| Arrow keys | Moves the selected control or controls in pixel increments. |
---------------------------------------------------------------------------------------------------------------
| CTRL+E | Enters Edit mode for a Label control when it is selected in the Report designer. |
---------------------------------------------------------------------------------------------------------------
| ESC | Exits Edit mode for a Label control and returns to Select mode. |
---------------------------------------------------------------------------------------------------------------
| SHIFT+Arrow key | Changes the height or width of the selected control or controls in pixel increments. |
---------------------------------------------------------------------------------------------------------------
| SHIFT+TAB | Moves to the previous object on the Report Designer when in Tab mode. |
---------------------------------------------------------------------------------------------------------------
| SHIFT+Double Click | Selects all objects in the band. |
| on a report band | |
---------------------------------------------------------------------------------------------------------------
| TAB | Enters Tab mode automatically and moves to the next object in the Report Designer. |
---------------------------------------------------------------------------------------------------------------
| SHIFT+F10 | Displays the shortcut menu in the Print Preview window in the Report Designer. |
| or Right Click | |
| or Right Win key | |
---------------------------------------------------------------------------------------------------------------
| ALT+ENTER | Opens the appropriate report control settings dialog box in the Report Designer. |
| or ALT+Double Click | |
---------------------------------------------------------------------------------------------------------------
Visual FoxPro supports the following keyboard shortcuts in Print Preview Window:
---------------------------------------------------------------------------------------------------------------
| Shortcut | Action |
---------------------------------------------------------------------------------------------------------------
| Z | Zooms in and out of the page. |
---------------------------------------------------------------------------------------------------------------
| L | Toggles between various zoom levels. |
---------------------------------------------------------------------------------------------------------------
| G | Opens Goto page dialog box. |
---------------------------------------------------------------------------------------------------------------
| ESC | Closes Print Preview window. |
---------------------------------------------------------------------------------------------------------------
| LEFTARROW | Scrolls to the left of the page in the Print Preview window. |
---------------------------------------------------------------------------------------------------------------
| RIGHTARROW | Scrolls to the right of the page in the Print Preview window. |
---------------------------------------------------------------------------------------------------------------
| UPARROW | Scrolls towards the top of the page in the Print Preview window. |
---------------------------------------------------------------------------------------------------------------
| DOWNARROW | Scrolls towards the bottom of the page in the Print Preview window. |
---------------------------------------------------------------------------------------------------------------
| PAGEDOWN | Moves to the next page in the Print Preview window. |
---------------------------------------------------------------------------------------------------------------
| PAGEUP | Moves to the previous page in the Print Preview window. |
---------------------------------------------------------------------------------------------------------------
| HOME | Moves to the first page in the Print Preview window. |
---------------------------------------------------------------------------------------------------------------
| END | Moves to the last page in the Print Preview window. |
---------------------------------------------------------------------------------------------------------------
| SHIFT+F10 | Displays the shortcut menu in the Print Preview window. |
| or Right Win key | NOTE: The keyboard shortcut is disabled in Visual FoxPro Advanced. |
---------------------------------------------------------------------------------------------------------------
| ALT+ENTER | Opens the appropriate report control settings dialog box in the Print Preview window.|
| | NOTE: The keyboard shortcut is disabled in Visual FoxPro Advanced. |
---------------------------------------------------------------------------------------------------------------
In vfp9 (and vfp6, vfp7, vfp8), we can press SHIFT+F10 (or Right Win key) to display the shortcut menu in the Print Preview window,
we can press ALT+ENTER to open the appropriate report control settings dialog box in the Print Preview window,
there are some security problems!
The bug occurs in vfp6, vfp7, vfp8, and vfp9 when set ReportBehavior 80, it does not occur in vfp9 when set ReportBehavior 90.
In Visual FoxPro Advanced, we can't press SHIFT+F10 (or Right Win key) to display the shortcut menu in the Print Preview window,
we can't press ALT+ENTER to open the appropriate report control settings dialog box in the Print Preview window,
there is no security problem.
2. CAUSE:
In vfp9 (and vfp6, vfp7, vfp8), we can press SHIFT+F10 (or Right Win key) to display the shortcut menu in the Print Preview window:
Cut && it will cause an error "File does not exist", and then the Print Preview window will be closed.
Copy && it will cause an error "File does not exist", and then the Print Preview window will be closed.
Paste && do nothing.
Properties && there are some security problems!
In vfp9 (and vfp6, vfp7, vfp8), we can press ALT+ENTER to open the appropriate report control settings dialog box in the Print Preview window,
there are some security problems!
In VFP Advanced, the keyboard shortcuts are disabled in the Print Preview window, there is no security problem.
There are some BUGs in the following code.
3. RESOLUTION:
We can write some code to fix the BUG.
Label47269a ::
mov eax , dword ptr [ ebx + 40 ] ;0x0047269a : 8b4328
or eax , dword ptr [ ebx + 24 ] ;0x0047269d : 0b4318
;
; ---------------------------------------------------------------------
; VFP 9.0 FIX - THE SHORTCUT MENU IN THE PRINT PREVIEW WINDOW
; October 2026
; ---------------------------------------------------------------------
; CCB
;
; the shortcut menu in the Print Preview window.
;
; 2026/10/28, by ccb
;
cmp dword ptr vfpa_sys9213_data,00h
je Label4726be
cmp eax , 0411Ch ;0x004726a0 : 3d1c410000
je Label55d614 ;0x004726a5 : 0f8469af0e00
cmp eax , 0115Dh ;0x004726ab : 3d5d110000
jne Label4726be ;0x004726b0 : 750c
mov ebx , edi ;0x004726b2 : 8bdf
call Fun4876e9 ;0x004726b4 : e830500100
jmp Label48ebf0 ;0x004726b9 : e932c50100
Label4726be ::
mov ecx , dword ptr [edi] ;0x004726be : 8b0f
mov ecx , dword ptr [ ecx + 88 ] ;0x004726c0 : 8b4958
mov eax , ebx ;0x004726c3 : 8bc3
call Fun4726cf ;0x004726c5 : e805000000
jmp Label48ebf0 ;0x004726ca : e921c50100
4. APPLIES TO:
VFP 6.0.8167.0
VFP 6.0.8961.0 (SP5)
VFP 7.0.0.9262
VFP 7.0.0.9465 (SP1)
VFP 8.0.0.2521
VFP 8.0.0.3117 (SP1)
VFP 9.0.0.2412
VFP 9.0.0.3504 (SP1)
VFP 9.0.0.4611 (SP2)
VFP 9.0.0.5015 (SP2)
VFP 9.0.0.5411 (SP2)
VFP 9.0.0.5721 (SP2)
VFP 9.0.0.5815 (SP2)
VFP 9.0.0.6303 (SP2)
VFP 9.0.0.6602 (SP2)
VFP 9.0.0.7423 (SP2)
The bug has been fixed in VFP Advanced.
IMPORTANT NOTE:
In vfp9 (and vfp6, vfp7, vfp8),
we can use the following code:
ON KEY LABEL SHIFT+F10 *
to disable the keyboard shortcut SHIFT+F10,
but we can't use the following code:
ON KEY LABEL ALT+ENTER *
to disable the keyboard shortcut ALT+ENTER.
5. REFERENCE WEBSITES:
1, baiyujia.com:
http://www.baiyujia.com
http://www.baiyujia.com/vfpdocuments/f_vfp9fix429.asp
6. OTHER:
For reference only, there is no guarantees.
Any questions or suggestions, please send me an email at ccb2000@163.com.
|