ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Managing external languages / Visual Basic
  • Overview
  • Managing objects and HFSQL files in Visual Basic
  • To migrate a WINDEV 5.5 application that manages the objects in Visual Basic
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
I was using Visual Basic with WINDEV 5.5. How to proceed in WINDEV 2024?
Overview
You have the ability to use external languages with WINDEV. For more details on the different ways to use elements developed in WINDEV with an external language, see external languages in WINDEV.
This paragraph presents the operations required to migrate a WINDEV 5.5 application that uses Visual Basic to WINDEV 2024.
Remark: The DDE calls (via CallDDE) in 16-bit mode are no longer available in this version of the external interface.
Managing objects and HFSQL files in Visual Basic

To migrate a WINDEV 5.5 application that manages the objects in Visual Basic

  1. Migrate your project from WINDEV 5.5 to WINDEV 7.5 and open it with WINDEV 2024.
  2. If necessary, create a "Library" project configuration. Integrate all the elements of your project into this configuration.
  3. Generate the skeleton of your application: in the data model editor, on the "Analysis" tab, in the "Analysis" group, expand "Generation" and select "Advanced generation". Caution: Don't overwrite the skeleton used by your application.
  4. Recreate the library of your WINDEV application: generate the "Library" project configuration.
  5. Delete the WinDevxx.Bas and WDHFxx.Bas files from the directory of your source codes (to avoid any confusion).
  6. In your Visual Basic project, delete the reference of dependency to the WDHF.bas and WINDEV.bas files.
  7. Copy the following files into the directory of your application.
    • WDHF.bas (available in the "External Languages\EN\Basic" subdirectory of the WINDEV installation directory).
    • WinDev.Bas (available in the "External Languages\EN\Basic" subdirectory of the WINDEV installation directory).
    • <AnalysisName>.Bas generated by WINDEV (found in the directory of the analysis of the WINDEV project).
    • <AnalysisName>.gbl generated by WINDEV (found in the directory of the analysis of the WINDEV project).
  8. Add these 4 files to the Visual Basic project.
  9. Delete the calls to CALLDDE from your Visual Basic application. This function could only be used in the applications in 16-bit mode.
  10. You can manage menus through one of the following methods:
    • Retrieving the shortcuts of menus with WDKEY = "*M*":
      While WDKey <> "ESC"
      ' perform the input of the menu
      Call callwd("SCREEN,input")
      ' the status report WDKey is set to *M* when a menu choice
      ' was selected
      If (WDKey = "*M*") Then
      '---------------------------------------
      ' Test of the selected option.
      ' WDString contains the sequence of shortcut letters
      ' that lead to the selected menu choice
      '---------------------------------------
      if( WDString="FQ" ) then WDKey = "ESC" ' Exit>
      If WDString = "RN" Then Call SearchCity  ' Search by City
      If WDString = "RD" Then Call SearchState  ' Search by State
      If WDString = "DD" Then Call LstState  ' Display list.
      If WDString = "DI" Then Call LstPrint ' Print.
      If WDString = "DC" Then Call LstConfig ' Configure printer
      End If
      Wend
    • Retrieving the shortcuts of menus by managing the shortcut in the option directly:
      1. In the code of each menu option to process, assign the shortcut to the WDKey keyword. For example, for File..Open:
        WDKey="FO";
      2. Modify the Visual Basic code as follows:
        ' the program loops until the File Exit option
        ' is selected
        While WDKey <> "ESC"
        ' perform the input of the menu
        Call callwd("SCREEN,input")
        '---------------------------------------
        ' Test of the selected option.
        '---------------------------------------
        If WDKey = "FE" then WDKey = "ESC" ' Exit
        If WDKey = "RN" Then Call FindCity ' Find City
        If WDKey = "RD" Then Call FindState ' Find State
        If WDKey = "DD" Then Call ListState ' Display list.
        If WDKey = "DI" Then Call LstPrint ' Print.
        If WDKey = "DC" Then Call LstConfig ' Configure printer
        Wend
  11. Recompile your Visual Basic project.
    Caution: the .Bas file generated by WINDEV contains a "Main" procedure. Keep your own "Main" procedure instead.
  12. Copy the necessary WINDEV DLLs into the directory of the executable of your application. Caution: wdxxxle.dll is mandatory.
Remark: To find out the list of necessary DLLs, create the executable of your application in WINDEV.
Minimum version required
  • Version 10
Comments
Click [Add] to post a comment

Last update: 09/07/2023

Send a report | Local help