CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2001
    Posts
    1

    Migrating from FoxPro to VB

    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?




  2. #2
    Join Date
    Jan 2000
    Location
    Olen, Belgium
    Posts
    2,477

    Re: Migrating from FoxPro to VB

    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
    [email protected]

    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
    Tom Cannaerts
    email: [email protected]
    www.tom.be (dutch site)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured