POS explorer and Receipt Printer
-
Saturday, April 21, 2012 12:34 AMWhen using POS explorer, everytime I claim my receipt printer it takes a few
seconds. My question is how can i claim the device at program startup then share
the device between forms? Meaning I want to open, claim and enable during
program startup then use the device on certain forms. Is this doable?
Any Help would be greatly appreciated
All Replies
-
Saturday, April 21, 2012 6:34 AMAnswerer
In my book, I tried to show an MSR passing data to a second form. A printer as you describe might work if you call the main form that claims the printer. Just a thought.
-Sean
www.sjjmicro.com / www.seanliming.com / www.annabooks.com, Book Author - Pro Guide to WES 7, XP Embedded Advanced, Pro Guide to POS for .NET
-
Saturday, April 21, 2012 8:46 AMDefine static object in Program.cs, open and claim one time and use in all forms.
-
Saturday, April 21, 2012 3:56 PM
Define static object in Program.cs, open and claim one time and use in all forms.
Can you please provide a small snippet to get me going in the right direction. Thank youl -
Saturday, April 21, 2012 3:57 PM
I've looked through several of your examples thank you for that. On my main sales screen i through a popup window for the total and each time I go to print a receipt after committing the transaction it is a two second or so delay. Is this standard operating procedure? Meaning is it ridiculous to think I can do it quicker?In my book, I tried to show an MSR passing data to a second form. A printer as you describe might work if you call the main form that claims the printer. Just a thought.
-Sean
www.sjjmicro.com / www.seanliming.com / www.annabooks.com, Book Author - Pro Guide to WES 7, XP Embedded Advanced, Pro Guide to POS for .NET
-
Monday, April 23, 2012 1:49 PM
Define static object in Program.cs, open and claim one time and use in all forms.
Can you please provide a small snippet to get me going in the right direction. Thank youlExample (only essentials):
Program.cs
==========...
using Microsoft.PointOfService;
...public static class Program
{
public static PosPrinter posprn; // used as equivalent of global variable in C/Pascal
...
}
FormMain.cs
===
...
using Microsoft.PointOfService;
...
public class FormMain : Form
{
public FormMain
{
InitializeComponent();
try
{
PosExplorer pe = new PosExplorer();
DeviceInfo di = pe.GetDevice(DeviceType.PosPrinter); // get default POS printer (must exist)
Program.posprn = (PosPrinter)pe.CreateInstance(di);
Program.posprn.Open();
Program.posprn.Claim(5000);
Program.posprn.DeviceEnabled = true;
...
}
catch (Exception ex)
{
}
}
...
} -
Saturday, April 28, 2012 7:39 PMThank you, I am using vb and this is working. One last questions if you dont mind. It takes approx 2 seconds for the recipt to start to print, then another delay before I print the second copy. Is this by design since I am using POS.net and not using the manufactures driver? I am using a Star TSP100 ECO
-
Wednesday, May 02, 2012 7:31 AM
Thank you, I am using vb and this is working. One last questions if you dont mind. It takes approx 2 seconds for the recipt to start to print, then another delay before I print the second copy. Is this by design since I am using POS.net and not using the manufactures driver? I am using a Star TSP100 ECO
I think the delay comes from the printer or printer driver. You can look in POS4net log to see the times. -
Friday, May 04, 2012 2:54 PMWhere can this log be found, I do not need see it under Microsoft Point Of Service folder?
-
Monday, May 07, 2012 7:35 AM
Where can this log be found, I do not need see it under Microsoft Point Of Service folder?
Enable logging in HKEY_LOCAL_MACHINE\SOFTWARE\POSfor.NET\Logging (Enabled key) and see the name and directory of logs. -
Tuesday, May 08, 2012 4:43 PMThank you.

