Click here to Skip to main content
15,891,372 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace TSCLIB_DLL_IN_C_Sharp
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {      

            //TSCLIB_DLL.about();                                                                  // show the dll version            
            //TSCLIB_DLL.openport("\\10.10.30.102\tscta210");
            //TSCLIB_DLL.openport("USB");
            TSCLIB_DLL.openport("\\10.10.30.102\tscta210");                                                       //Open specified printer driver
            TSCLIB_DLL.setup("149 mm", "38 mm", "3", "8", "0", "0", "0");                            //Setup the media size and sensor type info
            TSCLIB_DLL.clearbuffer();                                                              //Clear image buffer
            //TSCLIB_DLL.barcode("100", "100", "128", "100", "1", "0", "2", "2", "Barcode Test");  //Drawing barcode
            TSCLIB_DLL.printerfont("100", "250", "3", "0", "1", "1", "Print Font Test");           //Drawing printer font
            TSCLIB_DLL.windowsfont(100, 300, 24, 0, 0, 0, "ARIAL", "Windows Arial Font Test");     //Draw windows font
            //TSCLIB_DLL.downloadpcx("UL.PCX", "UL.PCX");                                          //Download PCX file into printer
            //TSCLIB_DLL.sendcommand("PUTPCX 100,400,\"UL.PCX\"");                                 //Drawing PCX graphic
            //TSCLIB_DLL.sendcommand("SIZE 4mm , 2.5mm");
            //TSCLIB_DLL.sendcommand("BOX 10,300,300,300,5");

            //TSCLIB_DLL.sendcommand("DIRECTION 1");
            //TSCLIB_DLL.sendcommand();
            //TSCLIB_DLL.sendcommand();
            //TSCLIB_DLL.sendcommand();

            TSCLIB_DLL.printlabel("1", "1");                                                       //Print labels
            TSCLIB_DLL.closeport();                                                                //Close specified printer driver 
            
        }
        
    }
}


My project is label printing (not barcode) with TSC(TSC TA210) Printer. This code snippets is there. And I get a error message "Printer is not been specified." But I describe correctly printer name.I don't understand lack of code or describe, define, syntax and ANOTHER METHOD

What I have tried:

With c# I compile program. And then I get a error message "Printer driver is not been specified." (Visual Studio 2012) Windows Form application
Posted
Updated 5-Apr-16 4:08am

1 solution

This is code which interacts with a specific DLL file - which presumably is supplied by the manufacturer of the actual printer. As such, the people you need to ask is not us: it's the people who wrote the DLL. I.e. the manufacturers of the printer!
They should have technical support - via a forum, email, or phone - and they are best placed to help you as you require knowledge of a DLL that very few (if any) people here are going to be using.

Start with their website, and see what you can find.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900