ID: Q124118
The information in this article applies to:
When a FoxPro table (.DBF) file is included in a project and the resulting application (.APP) file is encrypted, you may encounter problems such as a distorted display, a hung computer, or a return to the MS-DOS prompt.
To work around this problem, use a third party product such as Cryptor to encrypt the database, or use the techniques outlined in the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q115476
TITLE : How to Encrypt FoxPro .DBF Files
Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
1. Start FoxPro for MS-DOS. Use the CUSTOMER.DBF table located in the
FPW26\TUTORIAL directory, and create a quick screen. Save the screen as
CUSTOMER.SCX.
2. Open the CONTROL3.SCX screen located in the WINDOWS26\TUTORIAL
directory.
3. From the File menu, choose Save As to save the screen under a different
name (MYCONTROL.SCX). Then close CONTROL3.SCX.
4. From the file menu, choose Open to open MYCONTROL.SCX.
5. Double-click the push buttons and change the Append prompt to Browse.
Select the valid code snippet check box to expose the associated code.
Then modify the code as shown below.
DO CASE
CASE act2 = 1
GO TOP
CASE act2 = 2
SKIP -1
IF BOF()
GO TOP
ENDIF
CASE act2 = 3
SKIP 1
IF EOF()
GO BOTTOM
ENDIF
CASE act2 = 4
GO BOTTOM
CASE act2 = 5
DEFINE WINDOW test FROM 15,0 TO 21,44
ACTIVATE WINDOW test
BROWSE IN WINDOW test SAVE NOWAIT WHEN showget()
CASE act2 = 6
CLEAR WIND
CLEAR READ
ENDCASE
SHOW GETS
RETURN 0
6. Close the valid code snippet. From the system menu, choose Screen. Then
choose Screen Layout from the resulting popup. In the Screen Layout
dialog, activate the cleanup and procedure snippet. Then type this code:
PROCEDURE showget
SHOW GETS
RETURN
Then close the code snippet, and save the screen with the changes.
7. In the Command window, type the following to start a new project file:
Create project Test,
8. In the project file, choose Add to include the CUSTOMER.DBF table in the
project. Choose Add again to add the CUSTOMER.SCX screen. From the
system menu, choose Project. Then select "Set main" to make CUSTOMER.SCX
the main program.
9. With CUSTOMER.SCX highlighted in the project, click the edit push button
to edit the screen. Then from the edit screen dialog, choose Add to add
MYCONTROL.SCX to the screen set. Choose the arrange push button to
arrange the two screens side by side. Then save the arrangement, and
close the edit screen dialog.
10. From the sys menu, click Project. Then select project info. In the
project info dialog, select the encrypt check box so the resulting
TEST.APP file is encrypted. From the project file, choose Build. Then'
select Build Application to create the TEST.APP file. After completing
the .APP file, close the project file.
11. From the system menu, choose Run. Then choose "Run application," from
the resulting popup. Select TEST.APP from the group of files.
12. When the application is running, press the Next push button to see the
display update correctly. Then press the Browse button and move through
the data. You'll see that all records are fine. Press the Bottom push
button. You'll see a blank screen. try to use any of the push buttons
again. You will either see no records at all or garbage. After a short
time the computer may hang.
The problem does not occur if the .APP is built in FoxPro for Windows.
Additional reference words: FoxDos 2.50 2.50a 2.50b 2.60 2.60a buglist2.50 buglist2.50a buglist2.50b buglist2.60 buglist2.60a freeze crash hang no response dumped lock up locked KBCategory: kbtool kbbuglist KBSubcategory: FxtoolAccessory
Last Reviewed: January 5, 1995