Tutorial: Barcode in REALbasic

Officially, REALbasic is not supported by BarCodewiz, but guess what?? it took one minute to make it works in REALbasic…download my source code here, then you can further modify it to suit your needs

Photobucket

Photobucket

Photobucket

Photobucket

Photobucket

Requirement:
Barcodewiz ActiveX (i’m using ver 2.56)
REALbasic IDE (i’m using REALbasic 2008r2 Pro)

// the code

Window1.Open:
// similar to sub form_load() in VB
Sub Open()
editfield1.setfocus
MyBarcode
End Sub

Window1 Control popsim: //popupmenu control
Sub Change()
MyBarcode
End Sub

Window1 Control EditField1: //editfield control
Sub TextChange()
MyBarcode
End Sub

Window1.MyBarcode:
//this is method
Sub MyBarcode()
//////////////////////////////////////////////////////////////////////
‘Brought to you by Andra
‘Coderockstar Inc
‘Indonesia
‘I’m using BarCodeWiz ActiveX 2.56
‘pokel.wordpress.com
‘andralance at gmail dot com
/////////////////////////////////////////////////////////////////////
dim simbol,simbol2 as string
dim simbol_conv_to_numeric as integer

simbol=left(popsim.text,2)
simbol2=trim(simbol)
simbol_conv_to_numeric=val(simbol2)
barcodewiz1.symbology=simbol_conv_to_numeric
barcodewiz1.barcode=editfield1.text
End Sub

WARNING
barcodewiz.dll is required and must be correctly registered. See error pic below.
use this command to register: REGSVR32 barcodewiz.dll
Photobucket

10 Responses to “Tutorial: Barcode in REALbasic”


  1. 1 Blake December 24, 2008 at 9:14 pm

    Awesome, thanks a bunch!

  2. 2 Rinus Lapere January 7, 2009 at 10:18 am

    thx, but one more question:

    i need to print the barcode
    barcodewiz1.barcode

    any idea plz?

  3. 3 computeraholic March 12, 2009 at 1:30 am

    Barcodewiz ActiveX ini bisa dipakai buat barcode merek apa ja ya?
    Trus… bagi dunks ActiveX-na…

    Anyway … Thanks

  4. 4 pokel March 23, 2009 at 4:44 pm

    @computeraholic

    merk maksud nya jenis hardwarenya ya? semua bisa tuh.
    kalo jenis barcode yg bisa di bikin ya 17 jenis itu.
    activex nya hmmmm boleh ntar gw taroh di RS

  5. 5 Mark April 1, 2009 at 3:49 am

    Hi i am a newbie with real basic & am using the 2009r1 pro edition.
    When you say barcodewiz.dll is required and must be correctly registered do you mean that i need to copy the dll into the C:\Program Files\REAL Software\REALbasic 2009r1\REALbasic 2009 Libs
    & then navigate to the same folder at the command prompt & then run the REGSVR32 barcodewiz.dll to register it or should the .dll be placed somewhere else

  6. 6 pokel April 2, 2009 at 8:55 pm

    @ Mark
    you can place the dll anywhere, but when invoking the command you must be in the same directory as the dll.

    if you’re not in the same directory, pls include the directory location e.g REGSVR32 C:\barcodewiz.dll

    the REGSVR32 barcodewiz.dll command is used to copy the dll into windows system folder

    happy programming ;)

  7. 7 pokel April 2, 2009 at 9:10 pm

    or u can use the bat file like this

    @echo off
    REGSVR32 barcodewiz.dll

    save it as register.bat (or any name you like)

  8. 8 Mark May 14, 2009 at 1:55 am

    Thanks it works well.
    I now need to print the barcode but cant get it to work….
    I am finding RB printing a little difficult but have been able to get everything like listboxs, pictures, styled text to print ok but i just cant figure this one out. Any help would be greatly appreciated :-)

  9. 9 pokel May 14, 2009 at 9:13 pm

    @mark
    please stay tuned, the new tutorial (including barcode printing) is in the work… ;)
    i will upload it as soon as possible


Leave a Reply




WebMercenary v2.0


Elang Dari Kerajaan Matahari

Programming language enthusiast

An engineer by education, an IT contractor by profession

I saw myself as a man of diverse interest.....ranging from literature to shadowy world of cloak-and-dagger to human psyche

Still in love with BeOS/Zeta, the slick, beautiful and once revolutionary OS.
Seduced by the beauty of Mac OS X Leopard and iPhone.
Deeply admired REAL software for its true cross-platform IDE 'REALbasic'; Delphi for its true RAD environment; RemObjects Chrome (now Oxygene) for bringing the joy of Pascal to .net platform

Currently living in Medan Indonesia, graduated from Mechanical Engineering Department - Universitas Sumatera Utara - Medan

Key expertise:
cross-platform application development (win32, linux, mac), web development, graFX design, rotary & static equipment, turbomachinery, HVAC, finite element method


....Life is daring adventure or nothing at all...get onboard....


PageRank Checking Icon


andralance (Gtalk ID)

My status
andralance (Skype ID)



...the thing that solves problems, is not the programming language, the critical asset to solving the programming objective is the programmer...

ToolBox
REALbasic 2008r4.2
VS 2005
Aptana
RemObjects Chrome 2.0
RemObjects SDK
SharpDevelop (C#, VB05)
Delphi 2009
Delphi4PHP
Movamp (PHP,MySQL,Apache,CFusion)
Stylus XML Studio
VB 6.0
SQLMaestro (MySQL & FB)
Zend Studio 5.5
X-Mild + Cappuccino

AndTweet

  • waktu disidang MK kemaren, pas ngedengerin rekaman sadapan kok ya semua orang ngeliat kearah pengeras suara...kekekekeke...lucu ye 1 week ago
  • A computer once beat me at chess, but it was no match for me at kickboxing 2 weeks ago
  • There's always a darkness to bring u down, and there's always a light to shine u up, when u have no clue anymore, look into your heart... 2 weeks ago
  • Music is the poetry of the air 2 weeks ago
  • dingin kalilah ruang server ni 2 weeks ago

Berapa Harga Blog Ini?


My blog is worth $17,866.23.
How much is your blog worth?

Blog Stats

  • 76,660 hits

Stuff I’ve Built

Some of my portfolio (email me for full-listing)

Desktop Application
MyExpense (REALbasic+RealSQL) platform: win32, linux, mac
Keep track where your money goes

MyBook 1.0 (REALbasic+RealSQL) platform: win32, linux, mac
Books collection management system

MyBook Codename: Reboot 1.5 (REALbasic+MySQL) platform: win32, linux
Highly modified version from previous version. I tried to hide away as much of MySQL db things i.e: create database, table and field from the user as possible. Just run the MyBook, type your MySQL login and u’re ready to get up and running. The built in database builder will take care the rest.

InLabs (REALbasic+RealSQL) platform: win32, linux, mac
Lab Management system, inc: registration, scoring, asset management, billing and payment, etc

Kindyn (VB 6.0) platform: win32
Kinematics And Dynamics Analysis Simulation Of Slider-Crank Mechanism

Medsys (REALbasic+MySQL) platform: win32, linux, mac
Hospital management System, inc: record, pharmacy, billing, staff management, report, etc

HotelSys (REALbasic+MySQL) platform: win32, linux, mac
Hotel Management System, inc: room management, reservation, billing, services, report, etc

StreetRacer (REALbasic) platform: win32, linux, mac
Engine Tuning, inc: HP calculation, engine design, etc

Web
Patra Citra Collab Portal
The site is developed using Wordpress MU so every member of the organization can have their own blog. Custom theme is designed to meet the look and feel of the organization
Features:
Forum
Podcast
Newsletter
D-day countdown (i.e: anniversary)
Blog

COC - Climate Conservation NGO
Indonesian NGO engaged in climate conservation

ZabiNetwork
PHPIzabi-based social networking site

AndraJobber
Job Board
Status: development

Personal Sandbox
Webmercenary v2.0
url: webmercenary.co.nr

INTRails (Ruby On Rails)
url: n/a
Rails based portal, social networking and collab portal

Lantern Template
Blogger Template (tableless + valid CSS XHTML)

SuneagleZ Template
Wordpress Template (tableless + valid CSS XHTML)

Graphicz
I've worked for various clients in design and print industry in the following category
T-shirt And Sticker Design
Business Card Design
Packaged Product Cover Design
Flyer And Brochure Design
Magazine Cover

c