Click to See Complete Forum and Search --> : Migrating from FoxPro to VB


kavitha_sk
July 16th, 2001, 11:40 PM
I was trying to convert a program written in FOXPRO to VB using FLASH2B.exe Migration tool.I encountered a problem while trying to run the converted VB project. The brief description of the problem is like this:

1) The VB project starts from Sub Main() procedure of "module11.bas", which has the following code

Sub Main()
testprg.Show
testprg.Form_Begin
End Sub

2) "testprg.frm" ,which has the following code :

Option Explicit
Public Sub Form_Begin()
extern.Form
End Sub
Private Sub Form_Load()
Set dbs = OpenDatabase("C:\flashdb.mdb")
End Sub
Function flash2vb_val_aft(flag)
flash2vb_val_aft = 0
Select Case flag
End Select
End Function
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
VB_LASTKEY = KeyCode
If ControlCount(Screen.ActiveForm) <= 0 Then
Exit Sub
End If
If FlashNavigate(KeyCode, Screen.ActiveForm.ActiveControl) = 1 Then
SendKeys "{tab}"
KeyCode = 0
ElseIf FlashNavigate(KeyCode, Screen.ActiveForm.ActiveControl) = 2 Then
SendKeys "{tab}"
KeyCode = 0
ElseIf KeyCode = 16 And Shift = 1 Then
testprg_N = testprg.ActiveControl.TabIndex
End If
End Sub


3) When I tried to run the project I got a compile error :
"Cant find project or library" at line 3 : "extern.Form " of testprg.frm.


Could anybody help me to rectify the error so that I can run the converted VB program?

Cakkie
July 17th, 2001, 01:25 AM
This probably referes to

1) a control on the form that isn't there anymore (or never been).
2) a component, but there's no refference to it

I actually don't think you need it. Of course, I don't know what it does, but try to comment away that line. Also, search the code for any more occurences. If they are few, and you cannot determin what it is, try removing them. It might just as well be a component that shows a screen indicating what program was used to convert the foxpro program to vb (advertisement in other words). Just check it out.

Tom Cannaerts
slisse@planetinternet.be

Programming today is a race between software engineers striving to build bigger and better idot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook