From Clomosy Docs

(Created page with "It allows the serial number detected by reading barcodes to be transmitted to the electronic environment. After this stage, the transmitted information (on the computer or terminal) is analyzed and the result is reflected, so data entry is performed much faster and more accurately. CallBarcodeReader(TComponent) <span style="color:blue"> TComponent</span> : The component name will be written. After the barcode is read to the component name you have written, it will wr...")
 
No edit summary
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
It allows the serial number detected by reading barcodes to be transmitted to the electronic environment. After this stage, the transmitted information (on the computer or terminal) is analyzed and the result is reflected, so data entry is performed much faster and more accurately.
<div class="alert alert-ligth border border-3 border-primary-subtle rounded-5 p-4 shadow-sm" role="alert">
procedure CallBarcodeReader(TargetObject: TCLComponent);
</div>


  CallBarcodeReader(TComponent)
<span style="color:blue"><b>TargetObject</b></span> : An object name (such as TclEdit or TclLabel) where textual data will be added must be specified. After the barcode scanning process is completed, the scanned code is transferred to the designated textual object.<br>


<span style="color:blue"> TComponent</span> : The component name will be written. After the barcode is read to the component name you have written, it will write the barcode code to that component.
This process enables the transfer of the detected serial number from barcodes into an electronic environment. Following this step, the transmitted information is analyzed on the computer or terminal, and the result is displayed, allowing data entry to be performed much faster and more accurately.<br>


<div class="alert alert-danger" role="alert" data-bs-theme="light">
It is used on mobile devices.
</div>


'''Example:'''<br>
<b>Example</b><br>
We also made an example of barcode reading in the AddNewEvent feature. There is no need for variable definition in the application for barcode. Now let's see on the example. Let's add a button and when this button is clicked, the barcode will be read and put into the label.<br>
We also made an example of barcode reading in the AddNewEvent feature. There is no need for variable definition in the application for barcode. Now let's see on the example. Let's add a button and when this button is clicked, the barcode will be read and put into the label.<br>
'''Var''' 
MyForm:TFrmClomosyBasisForm;
testButton: TclButton;
testLabel : TclLabel;<br>
'''procedure''' ReadBarcode;
begin
MyForm.'''CallBarcodeReader'''(testLabel);
end;<br>
'''begin'''
MyForm:=TFrmClomosyBasisForm.Create(self);<br>
testButton:=MyForm.AddNewButton(MyForm,'testButton','Read Barcode');
testButton.TextSettings.Font.Size:=40;
testButton.Align := alCenter;
testButton.Height := 50;
testButton.Width := 150;
testButton.Margins.Bottom:=200;<br>
testLabel:=MyForm.AddNewLabel(MyForm,'testLabel','Barcode Code');
testLabel.Align := AlTop;
testLabel.Width := 100;
testLabel.Height :=50;
testLabel.Margins.Top:=200;<br>
MyForm.AddNewEvent(testButton,tbeOnClick,'ReadBarcode');<br>
MyForm.Run;
'''end;'''
'''Output:'''<br>
[[File:BarcodeReader.png|frameless|450px]]


<pre>
Var 
  MyForm:TclForm;
  testButton: TclButton;
  testLabel : TclLabel;
void ReadBarcode;
{
  MyForm.CallBarcodeReader(testLabel);
}


= See Also =
{
  MyForm = TclForm.Create(self);
 
  testButton = MyForm.AddNewButton(MyForm,'testButton','Read Barcode');
  testButton.TextSettings.Font.Size = 40;
  testButton.Align  =  alCenter;
  testButton.Height  =  50;
  testButton.Width  =  150;
  testButton.Margins.Bottom = 200;
 
  testLabel = MyForm.AddNewLabel(MyForm,'testLabel','Barcode Code');
  testLabel.Align  =  AlTop;
  testLabel.Width  =  100;
  testLabel.Height  = 50;
  testLabel.Margins.Top = 200;
 
  MyForm.AddNewEvent(testButton,tbeOnClick,'ReadBarcode');
 
  MyForm.Run;
}
</pre>
 
<b>Output:</b><br>
[[File:BarcodeReader.png|frameless|450px]]<br>
 
<h2> See Also </h2>
* [[Sensor Structures]]
* [[Components]]
* [[Object Properties]]
* [[Object Properties]]
* [[AddNewEvent]]
* [[AddNewEvent]]
{{#seo:|description=Learn about CallBarcodeReader in Clomosy. A guide to integrating barcode scanning functionality into your mobile apps for efficient data capture.}}

Latest revision as of 14:57, 8 April 2025

TargetObject : An object name (such as TclEdit or TclLabel) where textual data will be added must be specified. After the barcode scanning process is completed, the scanned code is transferred to the designated textual object.

This process enables the transfer of the detected serial number from barcodes into an electronic environment. Following this step, the transmitted information is analyzed on the computer or terminal, and the result is displayed, allowing data entry to be performed much faster and more accurately.

Example
We also made an example of barcode reading in the AddNewEvent feature. There is no need for variable definition in the application for barcode. Now let's see on the example. Let's add a button and when this button is clicked, the barcode will be read and put into the label.

Var   
  MyForm:TclForm;
  testButton: TclButton;
  testLabel : TclLabel;
void ReadBarcode;
{
  MyForm.CallBarcodeReader(testLabel);
}

{
  MyForm = TclForm.Create(self);
  
  testButton = MyForm.AddNewButton(MyForm,'testButton','Read Barcode');
  testButton.TextSettings.Font.Size = 40;
  testButton.Align  =  alCenter;
  testButton.Height  =  50;
  testButton.Width  =  150;
  testButton.Margins.Bottom = 200;
  
  testLabel = MyForm.AddNewLabel(MyForm,'testLabel','Barcode Code');
  testLabel.Align  =  AlTop;
  testLabel.Width  =  100;
  testLabel.Height  = 50;
  testLabel.Margins.Top = 200;
  
  MyForm.AddNewEvent(testButton,tbeOnClick,'ReadBarcode');
  
  MyForm.Run;
}

Output:
BarcodeReader.png

See Also