{"id":646,"date":"2012-11-27T15:53:46","date_gmt":"2012-11-27T15:53:46","guid":{"rendered":"http:\/\/www.bardecode.com\/en1\/?p=646"},"modified":"2013-02-19T11:08:34","modified_gmt":"2013-02-19T11:08:34","slug":"reading-barcodes-with-real-studio","status":"publish","type":"post","link":"https:\/\/www.bardecode.com\/en1\/reading-barcodes-with-real-studio\/","title":{"rendered":"Reading barcodes with Real Studio"},"content":{"rendered":"<p>Using the SDK with Real Studio on Windows is pretty straight forward and version 7.5.1.6 of the SDK now includes a full example. Anyhow, here&#8217;s what you need to do to get barcode reading working with Real Basic&#8230;<\/p>\n<h1>Step 1.<\/h1>\n<p>Download the barcode reader sdk from\u00a0<a href=\"http:\/\/bardecode.com\/barcoder.exe\">here<\/a><\/p>\n<h1>Step 2.<\/h1>\n<p>Navigate to where the sdk was installed and open the x86 folder, right click on REGISTER.BAT and select &#8220;Run as Administrator&#8221;. This will run regsvr32 on SoftekATL.dll &#8211; which is the dll you will be using later on.<\/p>\n<h1>Step 3:<\/h1>\n<p>Open Real Studio and start a new project or open the one you want to use for barcode reading. Click on Project, Add and select &#8220;ActiveX Component&#8221;<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/bardecode.com\/images\/realstudio1.png\" alt=\"\" border=\"0\" \/><\/p>\n<p>&nbsp;<\/p>\n<h1>Step 4:<\/h1>\n<p>Click on References, scroll down the list and select &#8220;SoftekATL X.X.X Type Library&#8221;. You will now be able to declare and use objects of type SoftekATL.CBarcode<\/p>\n<h1>Step 5:<\/h1>\n<p>In the method where you want to read the value of a barcode from an image, add the following code&#8230;<\/p>\n<pre>Dim oBarcode As SoftekATL.CBarcode\r\noBarcode = New SoftekATL.CBarcode\r\nDim nBarCodes As Integer\r\noBarcode.MultipleRead = 1\r\noBarcode.ScanBarCode(imagePath)\r\nnBarCodes = oBarcode.BarCodeCount\r\nFor i = 1 To nBarCodes\r\n\u00a0 \u00a0barcodeValue =\u00a0oBarcode.BarString(i)\r\nNext i<\/pre>\n<p>&nbsp;<\/p>\n<h1>Step 6:<\/h1>\n<p>That&#8217;s it &#8211; all done. You might want to add a few more lines of code to control what kind of barcodes you want to read and maybe set a license key:<\/p>\n<pre>oBarcode.LicenseKey = \"MY LICENSE KEY\"\r\noBarcode.ReadCode128 = 1\r\noBarcode.ReadQRCode = 1\r\noBarcode.ReadCode25 = 0<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Using the SDK with Real Studio on Windows is pretty straight forward and version 7.5.1.6 of the SDK now includes a full example. Anyhow, here&#8217;s what you need to do to get barcode reading working with Real Basic&#8230; Step 1. Download the barcode reader sdk from\u00a0here Step 2. Navigate to where the sdk was installed<\/p>\n<p><a href=\"https:\/\/www.bardecode.com\/en1\/reading-barcodes-with-real-studio\/\">Continue Reading &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":316,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[31],"tags":[19,146,96,175,174,69,65,80,127],"class_list":["post-646","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software-development-kits","tag-barcode","tag-example","tag-images","tag-real-basic","tag-real-studio","tag-scanner","tag-sdk-2","tag-settings-2","tag-windows-2"],"_links":{"self":[{"href":"https:\/\/www.bardecode.com\/en1\/wp-json\/wp\/v2\/posts\/646"}],"collection":[{"href":"https:\/\/www.bardecode.com\/en1\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bardecode.com\/en1\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bardecode.com\/en1\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bardecode.com\/en1\/wp-json\/wp\/v2\/comments?post=646"}],"version-history":[{"count":2,"href":"https:\/\/www.bardecode.com\/en1\/wp-json\/wp\/v2\/posts\/646\/revisions"}],"predecessor-version":[{"id":1550,"href":"https:\/\/www.bardecode.com\/en1\/wp-json\/wp\/v2\/posts\/646\/revisions\/1550"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.bardecode.com\/en1\/wp-json\/wp\/v2\/media\/316"}],"wp:attachment":[{"href":"https:\/\/www.bardecode.com\/en1\/wp-json\/wp\/v2\/media?parent=646"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bardecode.com\/en1\/wp-json\/wp\/v2\/categories?post=646"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bardecode.com\/en1\/wp-json\/wp\/v2\/tags?post=646"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}