|
|
|
|
- Overview
- Managing objects and HFSQL files in Visual Basic
- To migrate a WINDEV 5.5 application that manages the objects in Visual Basic
I was using Visual Basic with WINDEV 5.5. How to proceed in WINDEV 2024?
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 - Migrate your project from WINDEV 5.5 to WINDEV 7.5 and open it with WINDEV 2024.
- If necessary, create a "Library" project configuration. Integrate all the elements of your project into this configuration.
- 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.
- Recreate the library of your WINDEV application: generate the "Library" project configuration.
- Delete the WinDevxx.Bas and WDHFxx.Bas files from the directory of your source codes (to avoid any confusion).
- In your Visual Basic project, delete the reference of dependency to the WDHF.bas and WINDEV.bas files.
- 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).
- Add these 4 files to the Visual Basic project.
- Delete the calls to CALLDDE from your Visual Basic application. This function could only be used in the applications in 16-bit mode.
- 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:
- In the code of each menu option to process, assign the shortcut to the WDKey keyword. For example, for File..Open:
- 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
- Recompile your Visual Basic project.
Caution: the .Bas file generated by WINDEV contains a "Main" procedure. Keep your own "Main" procedure instead. - 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|