User Tools

Site Tools


VB.NET vs. KBasic


Porting VB Applications to Linux® or Mac® OS X

See a comparision of Visual Basic® and KBasic, the following paragraphs show you where they are different in ways that is related to porting your project. For the first time in computer history, with the release of Visual Basic.Net, many Visual Basic developers felt left behind. VB has changed so much that a Visual Basic implementation could not open and run old VB6 source code. It requires Visual Basic developers to modify their source code because .Net cannot run old Visual Basic code without re-working it. So, if you are a Visual Basic developer, you will be porting your projects for new ones or stick with old VB6. Porting means learning and using new keywords and new ideas in general. And keywords actually do not working as the old style, which means a lot of work. Actually, why should you switch to .Net? After learning a new language (.Net), significantly changing your source code base would be involved. Furthermore, you and your project would stick with a massive “framework” underneath and Windows, You would have a program that ran under Windows only. So what is the alternative? Instead of learning a new language and IDE, you better use your knowledge you already have. Use KBasic! It could use much of your Visual Basic code unchanged, and it can use most of your Visual Basic forms in a known way. And the best is, that KBasic is 100% syntax compatible, which means that KBasic and Visual Basic keywords work identically, including Mid, Left, Abs and so on.


Surprisingly, in KBasic, unlike in other BASIC's, Mid can also assign a string as the Mid statement as VB6 does. Almost all of your Visual Basic knowledge translates directly into KBasic. Of course, there are some form controls that do not work the same. But in summary, code differences between KBasic and Visual Basic lie not in the syntax, but in the object model, which have sometimes different control or property names. The controls (forms and checkboxes and so on) of KBasic and Visual Basic are very equal. KBasic has a much more built-in keywords, provided for backward and forward compatibility with VB6 and object oriented programming in general. But as in VB6, String is exactly the same in KBasic, as in Visual Basic to keep old source working. KBasic and Visual Basic each have some unique keywords as well. For example, Visual Basic has Int, GoSub and Space. KBasic has them, too.

KBasic programs run under Linux and Mac as well

You do not have to write extra code, to simulate VB6 in your KBasic application. KBasic has it all already done for you, so you do not have perfomance problems like in other BASIC's. Going on, KBasic has Min, Max; where Visual Basic does not. To make it easier for you, be sure to spend time with the 'Manual - The KBasic Book' and language reference beforehand. Another tip is to test and play with KBasic to get the feel for it. Normally, there are no language differences that do require you to re-work all of your Visual Basic code. All Visual Basic code imports and runs without changing it much as long as not form controls and other objects are involved. By the way, there are line numbers in KBasic, if you need them, too. Visual Basic programs run under Windows, only. KBasic programs run under Linux and Windows. KBasic has a much richer set of data types than Visual Basic. As such, there are compatible, incompatible and unique data types between Visual Basic and KBasic, with KBasic offering a much wider array of data types. The Boolean datatype has 1 byte size in KBasic, in VB6 it has 2 bytes. The Integer (Long) is 32bit (64bit) in KBasic, in VB6 16bit (32bit). Additionally, KBasic has got new datatypes, such as Integer datatypes, which can be used for VB6 Integer: Int16/Int32 (which is 16/32bit size).

No much difference

There is also no difference between how data is related into structures between the two languages. They both offer modules, forms and classes. No difference is in creating data structures as well. Visual Basic has User Defined Types, KBasic, too. The language structure of KBasic and Visual Basic is similar, but not quite the same, if you want it. KBasic provides some extra new keywords and functionality, to use some of the new object oriented features (other languages like Java or C++ provides for many years). You can use these new features in KBasic or just do the old VB6 stuff. Error handling is more robust and flexibel in KBasic than Visual Basic. KBasic offers two error-handling methods: Exception, which apply to an entire method, and Try-Catch blocks, which apply to specific sections of code. But if you would like the old way of handling errors, Visual Basic's On Error mechanism is supported as well. Actually, do not switch to .Net! Choosing instead to port to KBasic gives you full Windows, Mac and Linux support, no huge runtime, minimal system requirements, and portability to Windows and Linux.

At least, before starting with .Net, you should try KBasic. You might find KBasic right for you and a clear path to the future. By the way, a VB Project Converter is helping you converting your projects.

KBasic is the BASIC language alternative compiler

Why is KBasic a BASIC language alternative compiler for Windows, Mac OS X and Linux? KBasic is extremely well built, is a powerfull programming language and has a complete IDE: a very professional working environment RAD, which is very similar to VB6, a valid alternative to VB6. It has hundres of commands and functions. KBasic can compile Linux or Mac OS X applications from the Windows versions (or the other way around) and is a cross platform Basic programming language. It is currently available for Windows XP/2000, Mac OS X and Linux/i386. It generates stand alone EXE/BIN and has a great IDE to help beginners creating their applications. KBasic language includes a visual designer to build GUI with all the major elements such as windows, forms, menu and data aware controls, such as buttons, labels and frames, textboxes, radio buttons, combo boxes, list boxes, check boxes… The only true official alternative to VB6: The KBasic project started in 2000 as an open source project… KBasic is a professional development tool, cause this language offers all the elements to design and create professional products. KBasic gives a single, easy-to-use API for writing GUI applications on multiple platforms and the application will adopt the look and feel appropriate to that platform.The IDE is really well thinked and is completed with all the tools the programmer need such as sensitive-to-the-context help.

Well defined language

The language structure, the statements and functions are really simple to understand and the documentation is well written and complete. It comes with a very well done printable manual with more than 140 pages which describe in detail the great number of commands, statements and functions. A powerful and fully featured Basic-like language: It is completely object-oriented and byte-code compiled. The syntax is very similar to VB6 and the language supports common methods and properties. It is a fully object-oriented languages which uses inheritance and polymorphism. The IDE offers also project managment and property editing, syntax highlighting of the source code, code completion, and debugging mode. The IDE provides a source level debugger with breakpoints, and single stepping: step-through code, display values of variables in special windows or by moving the mouse over the variable name in the editor. The main characteristic of KBasic is that it has been created to allow developers with VB6 experience to start programming for Linux, Mac OS X and Windows without having to learn deeply a new language.

KBasic is a high level professional Basic for Linux, Mac OS X and Windows and its very good Basic language is constantly improved and updated.

vb.net_vs._kbasic.txt · Last modified: 2013/04/09 22:58 (external edit)