Wurlitzer28
Posts: 18
Joined: Fri Jan 02, 2015 4:41 pm

Replacement for Visual Basic. Is this possible? If so best program to use

Tue Jun 05, 2018 4:14 pm

I have written, in the Windows world, a VB program which does the following:

1) Reads a MS Access DB which contains a way to locate and display 2 ".JPG" files side by side
NOTE: These files are 650 x 850 and approx 250KB in size. There are approx 2,000 .jpg files < .75GB total.

2) Allows the placement of 1 to 10 TEXT Boxes over each ".JPG" image [20 max total]
NOTE: The text and text box x,y location date comes from the same MS Access DB

3) Based upon 2 micro-switches, go to the next 2 ".JPG" files or go back 2 ".JPG" files using the database for the new set of file names and text box information.
EG: xyz1.jpg & xyz2.jpg file displayed then display xyz3.jpg & xyz4.jpg

As the original WinXP is quite old, I'd like if possible, to do this with a RPi.

I have already moved all the tables from the MS Access DB to SQLite without issue. SQLite seems very well suited for this database application.

If there is some program which could emulate the logic in VB I'd just have to learn it.

USING the PI's HDMI port I am hoping to equal or better resolution than the old XP-monitor configuration.

IS THIS POSSIBLE? Best program to use to replace VB on the Pi?

Thanks in advance

scotty101
Posts: 3649
Joined: Fri Jun 08, 2012 6:03 pm

Re: Is this possible? If so best program to use.

Tue Jun 05, 2018 4:36 pm

If you've already moved the database to SQLite then that is the major concern out of the way.

You might consider QtDesigner and the QT GUI framework to create you application. QtDesigner will give you a drag and drop way to create the GUI and to write any C++ code required for the logic.
The microswitches should be easy enough to deal with as there are plenty of GPIO libraries for many different programming languages.

You could also consider MonoDevelop which will be similar in many ways to VB. You may have to develop it on another PC and then compile on the Pi or cross-compile for the Pi, It seems monodevelop IDE doesn't run very well on the Pi if at all.

Another option would be GTK but I'm not familiar with the development environments available for that.

There are a few python options too. Tkinter is the default python GUI framework but PyQT/PySide, GTK, Kivy and many other are available.
Last edited by scotty101 on Tue Jun 05, 2018 4:42 pm, edited 2 times in total.
Electronic and Computer Engineer
Pi Interests: Home Automation, IOT, Python and Tkinter

ghans
Posts: 7868
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Is this possible? If so best program to use.

Tue Jun 05, 2018 4:38 pm

Visual Basic 6 and earlier will probably never run natively on Linux. The Pi has an ARM CPU which makes this doubly impossible.

There is a commercial product called Xojo. Visual Basic fans seem to love it, so check it out ?

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

Wurlitzer28
Posts: 18
Joined: Fri Jan 02, 2015 4:41 pm

Re: Is this possible? If so best program to use.

Tue Jun 05, 2018 4:44 pm

Thanks for all the quick replies. I'll research these suggestions.

Loved VB6 in the Windows world as it never failed me but fully realize it is unlikely it would ever work in the RPi world. If I can get the GUI right the RPi & SQLite would seem a great combination.

W. H. Heydt
Posts: 10590
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Replacement for Visual Basic. Is this possible? If so best program to use

Tue Jun 05, 2018 7:20 pm

Pretty much every language these days has libraries to interface with SQL databases. Pick one that is easy for you to use for the presdentation layer. I would think that Python would be one of the relatively easy ways to go. (Disclaimer: I don't know or use Python. I use C to work with MySQL.)

PhatFil
Posts: 1308
Joined: Thu Apr 13, 2017 3:55 pm
Location: Oxford UK

Re: Replacement for Visual Basic. Is this possible? If so best program to use

Tue Jun 05, 2018 7:24 pm

while you cant drop the code straight into anything im aware, the basic logic employed should be valid within any language/framework that supports event driven programming allowing virtually line for line replacement..

I would check out NodeRed though its not quite the same paradigm as VB, but with R-Pi gpio nodes ready to handle your button input you need only translate the guts of your vb code into java script function nodes and use the gui drag n drop interface to literally join the dots..

ghans
Posts: 7868
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Replacement for Visual Basic. Is this possible? If so best program to use

Wed Jun 06, 2018 4:27 am

Another VB alternative for the Raspberry Pi is Gambas. Gambas is free software and can be installed via apt-get.

Code: Select all

sudo apt-get update
sudo apt-get install gambas3-ide
Gambas will not always run unmodified VB code, but it is probably the closest you'll ever get (except for Xojo perhaps ?).

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

W. H. Heydt
Posts: 10590
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Replacement for Visual Basic. Is this possible? If so best program to use

Wed Jun 06, 2018 2:37 pm

This thread points out a general problem, that of proprietary language processors and why one shouldn't use them. It's a trap to keep you on a particular platform.

hippy
Posts: 5591
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Is this possible? If so best program to use.

Wed Jun 06, 2018 3:03 pm

ghans wrote:
Tue Jun 05, 2018 4:38 pm
Visual Basic 6 and earlier will probably never run natively on Linux. The Pi has an ARM CPU which makes this doubly impossible.
That's probably true but there were tools which allowed VB6 programs to be developed for other platforms. MobileVB was a VB6 add-in which allowed it to be used for developing programs for Palm, Nokia Communicator and other devices. It worked great until Oracle took ownership of that and then seemingly set about extinguishing all existence of it.

These days Xojo ( formerly RealBASIC ) is about the closest one can get to VB6 but it's not an entirely free product. I believe one can install, use it, and run programs in the IDE for free but not create executables without paying the license fee and it's not what I'd call cheap.

Wurlitzer28
Posts: 18
Joined: Fri Jan 02, 2015 4:41 pm

Re: Replacement for Visual Basic. Is this possible? If so best program to use

Wed Jun 06, 2018 6:27 pm

Thanks for all the great replies: I'd like to address a few.
W. H. Heydt wrote: This thread points out a general problem, that of proprietary language processors and why one shouldn't use them. It's a trap to keep you on a particular platform.
True but I never felt trapped by VB6 as in my corporate life Windows was the main OS and I developed many applications controlling a plethera of industrial equipment. MS lost me when they went to VB.NET.
===============================================================================================
ghans wrote: Another VB alternative for the Raspberry Pi is Gambas. Gambas is free software and can be installed via apt-get.

Code: Select all

sudo apt-get update
sudo apt-get install gambas3-ide
Gambas will not always run unmodified VB code, but it is probably the closest you'll ever get (except for Xojo perhaps ?).

ghans
Given the huge differences in operating systems I had no illusions of VB porting directly to Linux on a RPi but just wanted something I could create a similar application for what has been running in VB6.

I looked a numerous posts for Gambas and was quite interested but got the impression it had either been abandoned or just not easy to get information to install and obtain coding assistance.
=======================================================================================
PhatFil wrote: while you cant drop the code straight into anything im aware, the basic logic employed should be valid within any language/framework that supports event driven programming allowing virtually line for line replacement..

I would check out NodeRed though its not quite the same paradigm as VB, but with R-Pi gpio nodes ready to handle your button input you need only translate the guts of your vb code into java script function nodes and use the gui drag n drop interface to literally join the dots..
I have used NodeRed for Home Automation and had not considered it for this application only because VB had been used to do a ton a data manipulation and display functions, like being able to drag & drop those Text Boxes I mentioned during RUN TIME and then write to the database their new location and new text info.

==============================================================================
I have, since yesterday been attempting to learn XOJO and most of the general display stuff like listboxes, buttons, text boxes is quite VB like. HOWEVER, the documentation for connecting to a SQLite DB and getting the recordsets to populate listboxes has been 95% wrong and quite frustrating. I have spent 12 hours copy/pasting stuff from the Web and XOJO's docs to just populate a 2 column list box from a SQLite Table because of errors in the supplied code.

This application requires significant data manipulation between 3 list boxes and associated database tables and I don't know how many errors in documentation I can handle. As mentioned the $$$ required for just a single RPi application is a bit much but XOJO is a nice IDE albeit needs some work on the DB/XOJO documentation.

Thanks again for all you great people who took the time to reply.

Return to “General discussion”