Support

Find the answers you are looking for

Mobile Development Samples

Windows Mobile

Following Windows Mobile Development Samples demonstrate the usage of Resco .NET CF controls in various situations. All samples include C#, or VB .NET source code for Microsoft Visual Studio.

Download ZIP file

Windows Phone 7

Following Windows Phone Development Samples demonstrate the usage of Resco .NET WP7 controls in various situations. All samples include C# source code for Microsoft Visual Studio.

Download ZIP file

Android

Following Android Development Samples demonstrate the usage of Resco controls for Xamarin.Android in various situations. All samples include C# source code for Microsoft Visual Studio.

Download ZIP file

iOS

Following iOS Development Samples demonstrate the usage of Resco controls for iOS in various situations. All samples include C# source code for Xamarin Studio.

Download ZIP file

Back to list

Article: Barcode scanner sample

Zebra printing interface available in MobileForms Toolkit

When we talk about printers, a lot of you will probably think of standard big laser printers that can print A4 format documents. However, documents are not the only thing that is being printed. In enterprise world, companies often need to print tickets, receipts, labels that can be scanned by barcode scanners. They are showing prices or, they are used to label what is inside of package or they are used for tracking of goods for instance. Millions of such tickets, labels and receipts are being printed in the world each day in industries such as warehousing, logistics, supply chain, maintenance, manufacturing, health care or public sector. Standard printers are not suitable for printing these. Portable printers are used instead. Zebra is a global leader of manufacturers of portable industrial printers with over 50% of market share. If you need to print something on portable printer, you need an additional device that will tell the printer what to print. You can use a desktop PC or a smartphone for instance. Obviously you cannot use a desktop PC if you want to print something in the field or inside the warehouse or on-the-go. A much better option is to go for a smartphone. However, mobile developers often find it too hard to make the printers work.

Zebra’s SDK is suitable especially for low-level programming. What does this mean? It means that making the printers work will take significant amount of time even for developers with advanced skills. To print a useful ticket or receipt via Zebra printer, mobile developer needs to dig into the code of Zebra’s SDK to find out everything about the functionality. He needs to understand various networks such as Bluetooth or Wifi and their protocols. When something is being printed, developer is working with printer commands whenever he needs to align text, print text, print picture or barcode, insert lines or other objects.

Resco’s solution will significantly decrease the time the developer needs to code such application that will print something on Zebra printer via Windows Mobile or CE device. Check out the video in which we demonstrate the use of the sample on real devices:

It consists of printing interface and reporting interface.

Printing interface

Printing interface is using Zebra’s SDK to connect to printer and send the printing commands. It is an extension to Zebra’s SDK and it provides additional code model. The developer now doesn’t need to send direct commands to printer. This is ensured via Resco’s interface.

Reporting interface

Reporting interface is working hand-in-hand with printing interface. It works directly with C# language. Developer can define a report in a form of an XML template which can be bind to any data source. There is a list of orders and customers in a sample application that is included with Resco MobileForms Toolkit.

Here is a sample XML template that will print some text, lines, list and barcode.

<?xml version="1.0" encoding="utf-8" ?>
<page Width="400" Mode="Journal">
      <!-- Print some information -->
      <panel Height="26" DataSource="Header">
            <text X="0" Y="0" Font="7" FontSize="0" MaxLength="14" Width="170" HAlign="Left">Count:
            <text X="170" Y="0" Font="7" FontSize="0" MaxLength="19" Width="230" HAlign="Right" DataMember="(Default)" />
            <line X="0" Y="24" X1="400" Y1="24" LineWidth="2" />
      </panel>

      <!-- Print list -->
      <repeatpanel Height="24" DataSource="Data">
            <text X="0" Y="0" Font="7" FontSize="0" DataMember="(Default)" />
      </repeatpanel>

      <!-- Print barcode -->
      <panel Height="120" DataSource="Barcode">
            <barcode X="0" Y="0" Type="Code128" Width="400" Height="96" HAlign="Center" DataMember="(Default)" />
            <text X="0" Y="96" Font="7" FontSize="0" Width="400" HAlign="Center" DataMember="(Default)" />
      </panel>
</page>

Template consists of several report objects such as “page”, “panel”, “text”, etc. that are defined in reporting interface.

Defining new custom reporting objects

Developer can also add some of his own reporting objects that he needs. This is an example how to define a new “rectangle” report object:

using System;
namespace Resco.Report
	{
	       public class ReportRectangle : ReportElement
	       {
	             public ReportRectangle()
	             {
	             }
             public int  Width { get; set;  }
	             public int  Height { get; set;  }
	             public int  Thickness { get; set;  }
             public override  void Print(Resco.Printer.IPrinter printer)
	             {
	                   printer.PrintRectangle(this.X, this.Y, this.Width, this.Height, this.Thickness);
	             }
             public override  void Scale(System.Drawing.SizeF scaleFactor)
	             {
	                   this.Width = (int)(this.Width * scaleFactor.Width);
	                   this.Height = (int)(this.Height *  scaleFactor.Height);
                   base.Scale(scaleFactor);
	             }
	       }
	}

Define new printer interface method for new command:

using System;
using System.Drawing;
namespace Resco.Printer
{
       public interface  IPrinter : IDisposable
       {
             …
             void PrintRectangle(int  x, int y, int  width, int height, int  thickness);
             …
       }
}

Implement the new command method to the PrinterZebra class:

public void  PrintRectangle(int x, int  y, int width, int  height, int thickness)
{
        // BOX {x0} {y0} {x1} {y1} {width}
        m_toolsUtil.SendCommand(String.Format("BOX {0} {1} {2} {3} {4}" + NL, x,  m_yOffset + y, x + width, m_yOffset + y + height, thickness));
}

And this is the example how to use our rectangle in XML:

<panel Height  ="100">
      <rectangle  X="0" Y="0" Width="400" Height="100" Thickness="2" />
</panel>

Developer can define more complex objects in a similar way.

Zebra printing sample will be accessible only for users with active subscription of Resco MobileForms Toolkit.

You can download the sample from https://portal.resco.net/ProductDownloads.aspx .

Product info: http://www.resco.net/developer/mobileformstoolkit/

Windows Mobile Development FAQ

Following Windows Mobile Development FAQs discuss various topics about Resco .NET CF controls.

Global

How can I access upgrades/bug fixes of the product I have purchsed?

Upgrades and bug fixes are available through the Customer Web Portal. It is accessible only for registered Resco customers and all downloads are available only during valid subscription.

My subscription has expired. How can I renew it?

Registered customers can renew their subscriptions through the Customer Web Portal

I have installed your product, but the controls did not appear in Visual Studio's 2005 toolbox. How can I add them there?

This depends on whether you are developing a desktop application or an application targeting .NET Compact Framework.
If you are developing a desktop application, then simply drag the Resco.%ControlName%.dll file and drop it onto the toolbox. Substitute the %ControlName% for the name of the particular product, e.g.: Resco.AdvancedList.dll.
If you are developing an application targeting .NET Compact Framework, drag the Resco.%ControlName%.CF2.dll file and drop it onto the toolbox. For the Visual Studio's designer to work properly, you have to make sure that, you have the Resco.%ControlName%.Design.dll properly registered in GAC (this only applies if you are developing for .NET Compact Framework).

How do I make sure that I have a Resco.%ControlName%.Design.dll file properly registered in GAC?

To view the contents of GAC, do the following:

  1. Go to the Windows' Control Panel.
  2. Double click 'Administrative Tools'.
  3. Double click 'Microsoft .NET Framework 2.0 Configuration'.
  4. Click 'Manage the Assembly Cache'.
  5. Click 'View List of Assemblies in the Assembly Cache'.
  6. Make sure the Resco.%ControlName%.Design.dll is listed.

For the designer to work correctly, you also have to make sure that the version of Resco.%ControlName%.Design.dll file listed in GAC is the same as the version of the .dll file you are referencing in your project. The GAC may contain the older versions of Resco.%ControlName%.Design.dll file.

I am not able to install Mobile Forms Toolkit in Microsoft Windows Vista. I get a message that says: "There is a problem with Windows installer package... Please contact your program vendor."

You have to be logged in as an Administrator in Microsoft Windows Vista to be able to install Resco Mobile Forms Toolkit correctly. This is because the installer program automatically integrates help files into Visual Studio's help and also because some COM objects are run that require administrator's privileges.

How do I download the latest upgrades and bugfixes? I read on your webpage that there is a newer version of my product. Where can I get it?

Upgrades and bug fixes are available through the Customer Web Portal. It is accessible only for registered Resco customers and all downloads are available only during valid subscription. You can re-download your product from there anytime as long as you have a valid subscription.

On your webpage I read that you also provide Visual Studio 2003 version of your products. But I downloaded from my reseller's webpage Visual Studio 2005 version only. Where can I get the VS 2003 version?

You can get it from the Customer Web Portal.

Windows Mobile and Windows CE FAQ

Where can I use the control ?

The SmartGrid is written fully in managed code targeting .NET Framework 1.1 and Microsoft .NET Compact Framework. You can use it on any desktop computer with installed .NET Framework and on any mobile device that has support for .NET Compact Framework ( you can check the following page ). The component has desing time support best used with the Microsoft Visual Studio .NET 2003, or higher.

What is the difference between Standard and Professional edition ?
How can I get the SmartGridDesigner ?

The SmartGridDesigner comes only with the Professional edition of the SmartGrid. This license to this edition also grants you to use the control by up to four developers. If the company has more developers, you should buy more licenses or the Site license.
The SmartGridDesigner is best suitable for enterprise developement specifically when you are using the XML templates, allowing the UI changes without the need to recompile project.
You can also distribute the SmartGridDesigner with your products, so you can provide your clients with the tool to customize your applications.

The control is grayed/is missing in the toolbox.

You should add the proper version of the control's library to the toolbox. When developing in the Compact Framework you should add to toolbox the design-time library located in [CF folder]/Design.

Adding the control to toolbox

I have upgraded the control and evaluation message remains/upgrade does not show.

The control's dlls are sometimes cached by VisualStudio.NET. Make sure that you use latest library in your project, i.e. by removing and adding the control reference.

Where can I found the control's documentation ?

The documentation is integrated with the Visual Studio .NET during the installation process. You should try turning off the filters or restarting VS.NET if it is not displayed in the Help Contents...

If you want to explore documentation from out of VS.NET, you can use following command:

"C:\Program Files\Common Files\Microsoft Shared\Help\dexplore.exe" 
/helpcol ms-help://RESCO.Controls.1033

Where can I use the control ?

The AdvancedList is written fully in managed code targeting .NET Framework 1.1 and Microsoft .NET Compact Framework. You can use it on any desktop computer with installed .NET Framework and on any mobile device that has support for .NET Compact Framework ( you can check the following page ). The component has desing time support best used with the Microsoft Visual Studio .NET 2003, or higher.

What is the difference between Standard and Professional edition ? How can I get the AdvancedListDesigner ?

The AdvancedListDesigner is a bonus tool that visualizes the customization and provides more features of customization. The AdvancedListDesigner is best suitable for enterprise developement specifically when you are using the XML templates, allowing the UI changes without the need to recompile project. You can also distribute the AdvancedListDesigner with your products, so you can provide your clients with the tool to customize your applications.

The control is grayed/is missing in the toolbox.

You should add the proper version of the control's library to the toolbox. When developing in the Compact Framework you should add to toolbox the design-time library located in [CF folder]/Design.

Where can I found the control's documentation ?

The documentation is integrated with the Visual Studio .NET during the installation process. You should try turning off the filters or restarting VS.NET if it is not displayed in the Help Contents...

If you want to explore documentation from out of VS.NET, you can use following command:

"C:\Program Files\Common Files\Microsoft Shared\Help\dexplore.exe"
/helpcol ms-help://RESCO.Controls.1033

How can I visually separate the Header / Footer row from other rows ?

The grid underline is no longer used for HeaderRow from version 2.1. Convenient solution is to use distinct BackColor of the header/footer and default row templates.

You can still separate the Header (and Footer) with line using the SeparatorCell. If you want to use SeparatorCell to separate the Rows, use the Vertical SeparatorType (separates the cells vertically) with Height 1 and chosen ForeColor.

How to use the property FormatString for a date ?

The format string for the text cell is the same format string as for the String.Format method.

FormatString = {0:d}
'short date   FormatString = {0:dd/MM/yyyy}

See also the example in help topic for the FormatString property.

Can I change the colors, border, font, etc. for each displayed cell in each row separately ?

This is possible, but not in the simple manner. The Cell object is in fact the cell template, and it is same for all the rows with given (Current)TemplateIndex. Thus changing e.g. BackColor will change this color in many rows.

When you just need to differentiate small number of situations (e.g. positive, negative or zero revenue), it is best to prepare more RowTemplates and change the template index to appropriate template in the ValidateData handler:

void advancedList1_ValidateData
(object sender, Resco.Controls.ValidateDataArgs e)
{
int index;
if( e.DataRow["revenue"] > 0 )
index = 1;
else if( e.DataRow["revenue"] < 0 )
index = 2;
else
index = 3;
e.DataRow.TemplateIndex = 0;
e.DataRow.SelectedTemplateIndex = index;
}

If you need to bind some properties (data in the Row) to the look of the cell, you can create special cells derived from standard cells and use them in the template. The C# code snippets can help you with this task.

Why is the width of the cell given as -1 ? What values can I use ?

Width of the cell can be any positive value, in that case cell doesn't resize itself with the resizing the grid. Value of -1 has special meaning, which means the cell is extended to the end of the row, with the respect to vertical scroll bar. This is usefull specifically when vertical scroll bar is shown/hidden and right aligned text is used.

Can I use my own dataset/datatable and somehow set the controls datasource?

DataSet usage on PocketPC is discouraged due to performance reasons. If you require best performance, using DbConnector is encouraged.

From version 2.1 it is possible to use any standard data source like DataTable, DataView, ArrayList, ... You just need to set up the DataSource property.

How can I load the data from dataset/datatable/list ?

From version 2.1 you can use the property DataSource. Another way is to load the data manually, creating new Resco.Controls.Row for each DataRow you want to display in the AdvancedList.

We have prepared sample code in C# and Visual basic you can use in your applications.

You can also read more in the new tutorial.

Can I use datasources for DbConnector other than SqlServerCe ?

You can use any IDbCommand in conjunction with the DbConnector. Make sure the Command property of DbConnector is set to valid IDbCommand with existing IDbConnection before setting the ConnectionString and CommandText of the DbConnector or before using it:

System.Data.SqlClient.SqlConnection 
connection = new System.Data.SqlClient.SqlConnection(connectionString);
System.Data.SqlClient.SqlCommand 
cmd = new System.Data.SqlClient.SqlCommand(cmdText, connection);
advancedList1.DbConnector.Command = cmd;
advancedList1.Reload();

For the datasources like XML files or datasets the best solution is to use the databinding or manual loading of Rows into the AdvancedList. In more advanced usage you can also create own IDataConnector implementation, see the documentation. Own IDataConnector is set using the AdvancedList.DataConnector property.

Where can I use the control ?

The DetailView is targeting .NET Framework 1.1 and Microsoft .NET Compact Framework. You can use it on any desktop computer with installed .NET Framework and on the mobile devices that has support for .NET Compact Framework ( you can check the following page ). The component has desing time support best used with the Microsoft Visual Studio .NET 2003, or higher.

What is the difference between Standard and Professional edition ?
How can I get the DetailViewDesigner ?

The DetailViewDesigner comes only with the Profesional edition of the DetailView. This license to this edition also grants you to use the control by up to four developers. If the company has more developers, you should buy more licenses or the Site license.
The DetailViewDesigner is best suitable for enterprise developement specifically when you are using the XML templates, allowing the UI changes without the need to recompile project.
You can also distribute the DetailViewDesigner with your products, so you can provide your clients with the tool to customize your applications.

The control is grayed/is missing in the toolbox.

You should add the proper version of the control's library to the toolbox. When developing in the Compact Framework you should add to toolbox the design-time library located in [CF folder]/Design.

Adding the control to toolbox

 

ItemNumeric resets to 0 or throws ArgumentOutOfRangeException.

ItemNumeric uses Compact Framework's NumericUpDown control, which is limited to 16 bit values. With decimal places set to 0 you can have maximum value of 32 767. When you set decimal places to d, you must divide this number with 10^{d}.
It is recommended to use ItemNumeric for fast input of values from small interval and for larger values you can use ItemTextBox with ItemValidating event, as in the second of our samples.

Where can I use the control ?

The CompactControls library is written fully in managed code targeting Microsoft .NET Compact Framework. You can use it on any mobile device that has support for .NET Compact Framework ( you can check the following page ). The component has desing time support best used with the Microsoft Visual Studio .NET 2003, or higher.

What is the difference between Standard and Professional edition ?

This license to this edition grants you to use the control by up to four developers. If the company has more developers, you should buy more licenses or the Site license.

The control is grayed/is missing in the toolbox.

You should add the proper version of the control's library to the toolbox. When developing in the Compact Framework you should add to toolbox the design-time library located in [CF folder]/Design.

Adding the control to toolbox

Where can I found the control's documentation ?

The documentation is integrated with the Visual Studio .NET during the installation process. You should try turning off the filters or restarting VS.NET if it is not displayed in the Help Contents...

If you want to explore documentation from out of VS.NET, you can use following command:

"C:\Program Files\Common Files\Microsoft Shared\Help\dexplore.exe" 
/helpcol ms-help://RESCO.Controls.1033 

How can I record to MP3 ?

To record to MP3, you must have an MP3 codec installed. MP3 codec is not part of MobileForms Toolkit license and has to be purchased separately. The algorithm for MP3 encoding and decoding (codec) is patented by Thompson company. Therefore, to use the codec, you must purchase a run-time license for each deployment of your application.

You can obtain the licenses for MP3 coded via: info@mp3licensing.com or fatma.rahal@thomson.net

Once you obtain the licenses, please send the proof to products@resco.net and we will subsequently provide you with the DLL including the codec that you need.

Where can I use the control ?

The Resco Zip .NET is written fully in managed code targeting .NET Framework and Microsoft .NET Compact Framework. You can use it on any desktop computer with installed .NET Framework and on any mobile device that has support for .NET Compact Framework ( you can check the following page).

The control is grayed/is missing in the toolbox.

You should add the proper version of the control's library to the toolbox. When developing in the Compact Framework you should add to toolbox the design-time library located in [CF folder]/Design.

Adding the control to toolbox

Where can I found the control's documentation ?

The documentation is integrated with the Visual Studio .NET during the installation process. You should try turning off the filters or restarting VS.NET if it is not displayed in the Help Contents...

If you want to explore documentation from out of VS.NET, you can use following command:

	"C:\Program Files\Common Files\Microsoft Shared\Help\dexplore.exe" 
	/helpcol ms-help://RESCO.Controls.1033

Back to list

Article: Barcode scanner sample

Zebra printing interface available in MobileForms Toolkit

When we talk about printers, a lot of you will probably think of standard big laser printers that can print A4 format documents. However, documents are not the only thing that is being printed. In enterprise world, companies often need to print tickets, receipts, labels that can be scanned by barcode scanners. They are showing prices or, they are used to label what is inside of package or they are used for tracking of goods for instance. Millions of such tickets, labels and receipts are being printed in the world each day in industries such as warehousing, logistics, supply chain, maintenance, manufacturing, health care or public sector. Standard printers are not suitable for printing these. Portable printers are used instead. Zebra is a global leader of manufacturers of portable industrial printers with over 50% of market share. If you need to print something on portable printer, you need an additional device that will tell the printer what to print. You can use a desktop PC or a smartphone for instance. Obviously you cannot use a desktop PC if you want to print something in the field or inside the warehouse or on-the-go. A much better option is to go for a smartphone. However, mobile developers often find it too hard to make the printers work.

Zebra’s SDK is suitable especially for low-level programming. What does this mean? It means that making the printers work will take significant amount of time even for developers with advanced skills. To print a useful ticket or receipt via Zebra printer, mobile developer needs to dig into the code of Zebra’s SDK to find out everything about the functionality. He needs to understand various networks such as Bluetooth or Wifi and their protocols. When something is being printed, developer is working with printer commands whenever he needs to align text, print text, print picture or barcode, insert lines or other objects.

Resco’s solution will significantly decrease the time the developer needs to code such application that will print something on Zebra printer via Windows Mobile or CE device. Check out the video in which we demonstrate the use of the sample on real devices:

It consists of printing interface and reporting interface.

Printing interface

Printing interface is using Zebra’s SDK to connect to printer and send the printing commands. It is an extension to Zebra’s SDK and it provides additional code model. The developer now doesn’t need to send direct commands to printer. This is ensured via Resco’s interface.

Reporting interface

Reporting interface is working hand-in-hand with printing interface. It works directly with C# language. Developer can define a report in a form of an XML template which can be bind to any data source. There is a list of orders and customers in a sample application that is included with Resco MobileForms Toolkit.

Here is a sample XML template that will print some text, lines, list and barcode.

<?xml version="1.0" encoding="utf-8" ?>
<page Width="400" Mode="Journal">
      <!-- Print some information -->
      <panel Height="26" DataSource="Header">
            <text X="0" Y="0" Font="7" FontSize="0" MaxLength="14" Width="170" HAlign="Left">Count:
            <text X="170" Y="0" Font="7" FontSize="0" MaxLength="19" Width="230" HAlign="Right" DataMember="(Default)" />
            <line X="0" Y="24" X1="400" Y1="24" LineWidth="2" />
      </panel>

      <!-- Print list -->
      <repeatpanel Height="24" DataSource="Data">
            <text X="0" Y="0" Font="7" FontSize="0" DataMember="(Default)" />
      </repeatpanel>

      <!-- Print barcode -->
      <panel Height="120" DataSource="Barcode">
            <barcode X="0" Y="0" Type="Code128" Width="400" Height="96" HAlign="Center" DataMember="(Default)" />
            <text X="0" Y="96" Font="7" FontSize="0" Width="400" HAlign="Center" DataMember="(Default)" />
      </panel>
</page>

Template consists of several report objects such as “page”, “panel”, “text”, etc. that are defined in reporting interface.

Defining new custom reporting objects

Developer can also add some of his own reporting objects that he needs. This is an example how to define a new “rectangle” report object:

using System;
namespace Resco.Report
	{
	       public class ReportRectangle : ReportElement
	       {
	             public ReportRectangle()
	             {
	             }
             public int  Width { get; set;  }
	             public int  Height { get; set;  }
	             public int  Thickness { get; set;  }
             public override  void Print(Resco.Printer.IPrinter printer)
	             {
	                   printer.PrintRectangle(this.X, this.Y, this.Width, this.Height, this.Thickness);
	             }
             public override  void Scale(System.Drawing.SizeF scaleFactor)
	             {
	                   this.Width = (int)(this.Width * scaleFactor.Width);
	                   this.Height = (int)(this.Height *  scaleFactor.Height);
                   base.Scale(scaleFactor);
	             }
	       }
	}

Define new printer interface method for new command:

using System;
using System.Drawing;
namespace Resco.Printer
{
       public interface  IPrinter : IDisposable
       {
             …
             void PrintRectangle(int  x, int y, int  width, int height, int  thickness);
             …
       }
}

Implement the new command method to the PrinterZebra class:

public void  PrintRectangle(int x, int  y, int width, int  height, int thickness)
{
        // BOX {x0} {y0} {x1} {y1} {width}
        m_toolsUtil.SendCommand(String.Format("BOX {0} {1} {2} {3} {4}" + NL, x,  m_yOffset + y, x + width, m_yOffset + y + height, thickness));
}

And this is the example how to use our rectangle in XML:

<panel Height  ="100">
      <rectangle  X="0" Y="0" Width="400" Height="100" Thickness="2" />
</panel>

Developer can define more complex objects in a similar way.

Zebra printing sample will be accessible only for users with active subscription of Resco MobileForms Toolkit.

You can download the sample from https://portal.resco.net/ProductDownloads.aspx .

Product info: http://www.resco.net/developer/mobileformstoolkit/

Support is no longer available, only these archived documents can be seen

Busy Indicator Please wait... Processing...