Microsoft visual basic linux

Installing Visual Basic Applications on Linux

Linux’s ability to run Visual Basic applications has been improving steadily. In late 2002, Wine was not mature enough to install or run Visual Basic applications. In late 2005, Wine is mature enough to both install and run simple Visual Basic applications — but a certain amount of fortitude is still required.

I’ve recently spent some time helping people install Visual Basic applications on Linux using Wine. So far, I’ve seen four basic kinds of problems:

Installer quits because IE6 isn’t installed

(e.g. Wine bug 3453) That’s awfully pessimistic of them. You can bypass this check by creating a text file foo.txt containing

[HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer] "Version"="6.0.2900.2180"

That will often solve the problem, or at least let you get past it long enough to run into the next problem.

Installer crashes because some runtime library isn’t already installed

VB installers are supposed to bundle all the libraries that the application will need, but many installers skimp on this. (They get away with it because some other application already installed the libraries, but that doesn’t work on Wine, where no or few applications are installed by default.)

The problem is, Wine doesn’t make it easy to tell which runtime library you’re missing. Oh, it does tell you; it outputs an error message, but it’s hidden among thousands of other boring lines like

fixme:ole:ITypeInfo_fnRelease destroy child objects

To find these lines, run the installer again and redirect the output of Wine to a log file. Then search the log for lines containing the string «err:». Then, if you see a line like

err:module:import_dll Library MSVBVM60.DLL (which is needed by "C:\\foo\\bar\\baz.ocx") not found

look up which installer you need to run to get the missing DLL. If you can guess the vendor (often Microsoft), you can search the vendor’s web site for the DLL. In this case, the DLL is part of the Visual Basic 6 runtime, and you can get it by downloading and installing the Visual Basic 6 Runtime installer.

Installer fails because of a Windows API stub in Wine

MDAC, a database runtime library from Microsoft, has an installer which fails silently because of a Windows API that Wine implements only as a stub (see bug 3636). You can check for these by searching the Wine log for the word «stub».

Читайте также:  Cities skylines linux crash

Installer quits complaining «Unable to Register foo.tlb»

The person who packaged the application used DLLSelfRegister when they should have used TLBRegister. I was able to just edit SETUP.LST as described in support.microsoft.com/kb/299645 and rerun the installer to get past this.

Источник

VB.NET on Linux

Is it possible to run VB.NET in Linux? I have written code in VB.NET and compiled it as well using Visual Studio in Windows. Can the same code be written (and compiled) on Linux as well? If yes, then which software do I need to install on Linux? Is the Linux alternative of VB.NET freeware?

8 Answers 8

You can run Visual Basic, VB.NET, C# code and applications on Linux.

The most popular .NET IDE is Visual Studio (now in version 2019) that runs in Windows and macOS. A good alternative for Linux users is Visual Studio Code (runs on Linux, Windows and Mac).

You can compile and run VB.NET code and applications (part of .NET framework, consider the successor of Visual Basic, with several language differences from Visual Basic 6.0). A subset of .NET is .NET Core that can be installed on

You can also use Mono, a free and open-source project led by Xamarin (a subsidiary of Microsoft) and the .NET Foundation. The project focus is to support an ECMA standard-compliant .NET Framework-compatible set of tools (including a C# compiler and a Common Language Runtime).

You can run most Windows applications (created with VB, VB.NET or with other tools) using Wine that supports the Windows API on Linux.

** About Visual Basic (not VB.NET, due to the original question) **

Note that the last version of visual basic is 6.0, released in 1998, declared legacy during 2008 and supported on Windows XP, Windows Vista, Windows Server 2008 including R2, Windows 7, Windows Server 2012, and Windows 8.x. There are also other basic flavors (like QuickBASIC, Gambas or others).

  • The Visual Basic 6.0 IDE [Integrated Development Environment]: supported ended on April 8, 2008.
  • Visual Basic 6.0 Runtime the base libraries and execution engine used to run Visual Basic 6.0 applications: support ended on April 8, 2014.
  • Visual Basic 6.0 Runtime Extended Files: support ended on April 8, 2014.

Источник

Running Visual Basic under Ubuntu Linux

NOTE : This is not yet complete. Please feel free to fix any typos or writing errors, but please have in mind this test isn’t complete.

Linuxcube

Welcome. In this little test I’ll install Microsoft Visual Studio under Ubuntu Linux.

Why do it this way, if we could use Gambas instead or a C compiler? Well, this is for the programmers that use Visual Basic and want a soft change from Visual Basic to Gambas, or just for curious people. Or perhaps for people who still have a lot of Visual Basic code.

Читайте также:  Linux opera secure preferences

For this test I will use Ultimate Ubuntu Linux — You can look for it here. It has the advantage that it has all needed software pre-installed (even Wine), and the only thing I did was configuring Wine.

Installing [ ]

Winesettings

The installation didn’t have big problems, although there were some files that couldn’t be installed, e.g. DCOM 98 or registering some files on MSDN Setup. I installed the program on

~/.wine/drive_c/Archivos de programa/Microsoft Visual Studio

Note for Wine newbies: «drive_c» corresponds to «C:\», so it was simply installed to the the Wine version of the normal program files folder, where you’d probably install most other Windows programs as well.

Setup (only Visual Studio) has taken 4~5 minutes on this Pentium 4 (2.26 MHz) machine with 512 MB RAM, about 1~3% slower than under Windows. The MSDN Setup has taken about 15~20 minutes, a lot slower, if you take into account that on this machine the MSDN Setup under Windows XP has taken 5~10 minutes, but that’s not new. At the moment, Linux binary files run very fast, but Windows programs run very slowly. (Or perhaps the MSDN installer did something out of the ordinary that is slow on Wine? Considering that the other part of the installation process was just as fast within the probable margin of error. )

There it was a .DLL file than MSDN Setup couldn’t register on Wine registry, something related Internet Explorer, I think. Will see in the future if that DLL gives problems.

If we ignore the slow speed of Setup, it was very good for the thing I thought would be. The errors were minimal, speaking of Windows programs.

NB. If the problem was about Internet Explorer I would suggest to install wine doors in Ubuntu to install the internet explorer. I have not tested this yet. I am just giving a hint for those who need/love visual basic but are not compatible with their operating system.

Источник

Visual Basic в Linux. Практика преподавания в школе

Наверное, одной из самых сложных задач перехода на СПО в школе является подбор альтернативного программного обеспечения, для организации учебного процесса. В младших классах такой выбор сделать не сложно, в виду большого выбора программного обеспечения (OpenOffice.org, KTurtle, Gcompris и т.д.). Но что же делать в старших классах, где необходимо изучать программирование?

Ответ на поставленный вопрос дает автор учебно-методического комплекса Н.Д. Угринович, который рекомендует как альтернативу для изучения Visual Basic в ОС Linux систему программирования Gambas.

Gambas2

Gambas — объектно-ориентированный диалект языка BASIC, дополненный интегрированной средой разработки и работающий на GNU/Linux и других UNIX-подобных операционных системах. Он представляет собой средство, аналогичное Visual Basic в плане разработки программ на Basic. Gambas задумывался как альтернатива для Microsoft Visual Basic разработчиков, решивших перейти на GNU/Linux. (http://ru.wikipedia.org/wiki/Gambas).

Читайте также:  Самый маленький linux сервер

Используя Gambas мы получаем свободно распространяемую среду программирования воспользоваться которой легко могут и учащиеся у себя на домашних компьютерах. т. е. Учитель получает возможность задавать задания на дом по программированию и учащиеся, работая дома не нарушают закон. Для такой организации процесса обучения достаточно записать на DVD диск Альт Линукс Школьный Мастер 5.0 (http://www.altlinux.ru/products/5th-platform/school-box/) и раздать его ученикам для загрузке в режиме Live-DVD на домашних компьютерах.

Однако, не все так просто, как казалось бы. Прежде чем воспользоваться учебником необходимо освоиться со средой программирования, так как синтаксис Gambas несколько отличается от Visual Studio .NET, на который изначально ориентирован учебник. И тут на помощь нам приходит интернет и справочная система, встроенная в Gambas.

Gambas2 - Help

Вооружившись таким грозным оружием перейдем от теории практике. Итак — Информатика и информационные технологии. Учебник для 9 класса / Н.Д. Угринович. — 5-е изд. — М.: БИНОМ. Лаборатория знаний, 2007.

Страница 71 Проект «Обычный калькулятор»:

Разработать проект, который позволит производить четыре арифметических действия

над числами (сложение, вычитание, умножение, деление).

  • два текстовых поля TextBox1 и TextBox2 для ввода числовых данных;
  • надпись Label1 для вывода результата;
  • четыре кнопки Button1, Button2, Button3 и Button4 для создания событийных
  • процедур: сложения, вычитания, умножения, деления.

Gambas2 - программа

С помощью панели Свойств измените заголовки объектов и их цвет (свойства Font (шрифт) и Backgraung (заливка)).

3. Двойным щелчком мыши по кнопке вызовете окно Программного кода с заготовкой событийной процедуры.

4. Событийная процедура сложения чисел Button1_Click() должна присваивать значению свойства Text надписи Label1 сумму числовых значений, введённых в текстовые поля TexBox1 и TexBox2. Для преобразованиястроковых значений свойства Text текстовых полей в десятичные числа воспользуйтесь функцией Val (), аргументом которой является строка, а значением число.

5. Пример событийной процедуры сложения:

PUBLIC SUB Button1_Click()

Label1.Text = Val(TextBox1.Text) + Val(TextBox2.Text)

6. Событийные процедуры вычитания, умножения и деления создаются аналогично.

7. Для создания событийной процедуры для кнопки «Сброс» воспользуйтесь свойствами объектов Clear и присоединения текстовому значению пустой строки:

PUBLIC SUB Button5_Click()

Label1.Caption = «»

TextBox1.Clear

TextBox2.Clear

Gambas2

Страница 74. Проект «Сложение строк»

Задание. Разработать проект , для сложения двух строковых переменных A и B и строки «форма» используется операция конкатенации.

Gambas2 - сложение строк

  1. Создайте графический интерфейс проекта: Поместите на форму кнопку Button1 и надпись Label1
  2. Создайте событийную процедуру и введите следующий код: PUBLIC SUB Button1_Click()DIM A, B AS StringA = «Ин»B = «тика»Label1.Text = A & «форма» & BEND
  3. Запустите проект на выполнение .

Таким образом приложив немного усилий можно организовать преподавание программирования в старших классах, имея на руках методический комплекс и рабочую программу по информатике.

Источник

Оцените статью
Adblock
detector