Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,027

HOME > .NET Framework > Forum > ขอโค้ดสั่งพิมพ์ด้วยคับของเครื่องพิมพ์สลิปรุ่น Citizen ct-s310ii



 

ขอโค้ดสั่งพิมพ์ด้วยคับของเครื่องพิมพ์สลิปรุ่น Citizen ct-s310ii

 



Topic : 100225

Guest




ผมชื้อเครื่องพิมพ์สลิปมาแต่ไม่รู้จักวิธีสั่งพิมพ์ ขอโค้ดสั่งพิมพ์ด้วยคับ
ให้มันพิมพ์เลยโดยไม่ต้องดูตัวอย่างก่อนพิมคับ



Tag : VS 2008 (.NET 3.x)







Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2013-09-09 15:42:56 By : Tonza View : 1284 Reply : 6
 

 

No. 1



โพสกระทู้ ( 74,058 )
บทความ ( 838 )

สมาชิกที่ใส่เสื้อไทยครีเอท

สถานะออฟไลน์
Twitter Facebook

มีคู่มือ Document เกี่ยวกับ Developer ไหม๊ครับ






แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2013-09-10 09:07:37 By : mr.win
 


 

No. 2

Guest


มีคับ
POSfor.NETApDevGuide_EN_Rev1.04.pdf
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2013-09-10 09:32:21 By : tonzaa
 

 

No. 3

Guest


ตัวอย่างที่มันแถมมา
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
//-------------------------------------------------------------------------------
// Copyright(C) 2009 CITIZEN SYSTEMS JAPAN CO., LTD. All Rights Reserved.
//-------------------------------------------------------------------------------
// Layout Utilities sample code [[ TestPrint ]] for VCS2008
//
// This program is the basic print sample cord which used a layout file.
// In addition, please understand that error processing is not performed.
//
// The command procedure that is necessary for print is as follows.
//
// [01] Creates the object.
// [02] Opens the layout file.                           Open
// [03] Initializes the object.                          BeginPrint
// [04] Gets an index of the frame.                      InitFrame
// [05] Gets an index of the part in the frame.          GetParts
// [06] Modifies the working area in the object.         SetPartsData
// [07] Copies the working area to the print area.       AddFrame
// [08] Starts the print.                                DoPrint
// [09] Cancels the work area.                           EndPrint
// [10] Clears all area in the object.                   Close
namespace TestPrint
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            //-------------------------------------------------------------------------------
            // Gets all installed printers name in the OS.
            //-------------------------------------------------------------------------------
            foreach (string printerName in System.Drawing.Printing.PrinterSettings.InstalledPrinters)
            {
                comboBox1.Items.Add(printerName);
            }

        }

        private void button1_Click(object sender, EventArgs e)
        {
            //-------------------------------------------------------------------------------
            // Selects a custom layout file. (by common dialog)
            //-------------------------------------------------------------------------------
            openFileDialog1.InitialDirectory = @"..\..\";
            openFileDialog1.RestoreDirectory = true;
            openFileDialog1.Title = "Open a CLF file";
            openFileDialog1.Filter = "CLF files (*.clf)|*.clf";
            openFileDialog1.FileName = "";
            if (openFileDialog1.ShowDialog() == DialogResult.OK){
                textBox1.Text  = openFileDialog1.FileName;
            }
        }

        private void button2_Click(object sender, EventArgs e)
        {
            //-----------------------------------------------------------------
            // Preparations
            //-----------------------------------------------------------------
            // [01] Creates the object.
            Citizen.LayoutUtilities.Printing.Controller clpc = new Citizen.LayoutUtilities.Printing.Controller();

            // [02] Opens the layout file.
            // Argument : pathName
            int result = clpc.Open(textBox1.Text);
            
            // [03] Initializes the object.
            // Initializes a result of InitFrame() and AddFrame().
            // Argument : None
            clpc.BeginPrint();
            
            //-----------------------------------------------------------------
            // Modifies a value of "Text1" in "Frame1", and add it to the print area.
            //-----------------------------------------------------------------
            // [04] Gets an index of the frame.
            //      Copies the frame to the working area in the object.
            // Argument : frameName
            int frameIndex = clpc.InitFrame("Frame1");

            // [05] Gets an index of the part in the frame.
            // Argument : frameIndex, partName
            int partsIndex = clpc.GetParts(frameIndex, "Text1");

            // [06] Modifies the working area in the object.
            // Argument : frameIndex, partIndex, setText
            result = clpc.SetPartsData(frameIndex, partsIndex, textBox2.Text);

            // [07] Copies the working area to the print area.
            //      Execute InitFrame() before this processing.
            // Argument : frameIndex
            result = clpc.AddFrame(frameIndex);

            // -----------------------------------------------------------------
            // Prints the print area.
            // -----------------------------------------------------------------
            // [08] Starts the print.
            //      Execute AddFrame() before this processing.
            // Argument : printerName (Blank : The default printer is used to print.)
            result = clpc.DoPrint(comboBox1.Text);

            // -----------------------------------------------------------------
            // Processing of end
            // -----------------------------------------------------------------
            // [09] Cancels the work area.
            //      Execute BeginPrint() or Close() after this processing.
            // Argument : None
            clpc.EndPrint();

            // [10] Clears all area in the object.
            //      Execute Open() after this processing.
            // Argument : None
            clpc.Close();
        }
    }
}


ผมลองมาแปลงเป้น vb มันผิดตรงนี้อะคับ
Citizen.LayoutUtilities.Printing.Controller clpc = new Citizen.LayoutUtilities.Printing.Controller();
มาใส่ใน vb เป็นแบบนี้ มันเติมวงเล็บให้เองด้วยคับ
citizen.LayoutUtilities.Printing.Controller (clpc = New CITIZEN.LayoutUtilities.Printing.Controller)
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2013-09-10 12:03:54 By : tonzaa
 


 

No. 4



โพสกระทู้ ( 394 )
บทความ ( 0 )



สถานะออฟไลน์


ควรจะเป็นแบบนี้มากกว่าหรือเปล่า

Code (VB.NET)
Dim clpc as new Citizen.LayoutUtilities.Printing.Controller()

แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2013-09-11 16:28:11 By : Nameless
 


 

No. 5

Guest


ได้แล้วคับขอบใจมากมากคับ

ตอนนี้มีคำถามอีกแล้วคับ อยากราบว่า รันอยู่ form1 แล้วคลิกbutton เปิด form2ขึ้นมา แล้วส่งค่าจากform2มาที่ form1 อะคับทำยังไงคับ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2013-09-11 19:22:59 By : Tonzaa
 


 

No. 6



โพสกระทู้ ( 74,058 )
บทความ ( 838 )

สมาชิกที่ใส่เสื้อไทยครีเอท

สถานะออฟไลน์
Twitter Facebook

ตอบความคิดเห็นที่ : 5 เขียนโดย : Tonzaa เมื่อวันที่ 2013-09-11 19:22:59
รายละเอียดของการตอบ ::
กระทู้เก่า ๆ มีครับ การส่งค่าผ่าน Form

แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2013-09-12 05:59:38 By : mr.win
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : ขอโค้ดสั่งพิมพ์ด้วยคับของเครื่องพิมพ์สลิปรุ่น Citizen ct-s310ii
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ FTP| ใส่แถวของตาราง ใส่คอลัมน์ตาราง| ตัวยก ตัวห้อย ตัวพิมพ์ดีด| ใส่โค้ด ใส่การอ้างถึงคำพูด| ใส่ลีสต์
smiley for :lol: smiley for :ken: smiley for :D smiley for :) smiley for ;) smiley for :eek: smiley for :geek: smiley for :roll: smiley for :erm: smiley for :cool: smiley for :blank: smiley for :idea: smiley for :ehh: smiley for :aargh: smiley for :evil:
Insert PHP Code
Insert ASP Code
Insert VB.NET Code Insert C#.NET Code Insert JavaScript Code Insert C#.NET Code
Insert Java Code
Insert Android Code
Insert Objective-C Code
Insert XML Code
Insert SQL Code
Insert Code
เพื่อความเรียบร้อยของข้อความ ควรจัดรูปแบบให้พอดีกับขนาดของหน้าจอ เพื่อง่ายต่อการอ่านและสบายตา และตรวจสอบภาษาไทยให้ถูกต้อง

อัพโหลดแทรกรูปภาพ

Notice

เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ
อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง

   
  เพื่อความปลอดภัยและการตรวจสอบ กระทู้ที่แทรกไฟล์อัพโหลดไฟล์จากที่อื่น อาจจะถูกลบทิ้ง
 
โดย
อีเมล์
บวกค่าให้ถูก
<= ตัวเลขฮินดูอารบิก เช่น 123 (หรือล็อกอินเข้าระบบสมาชิกเพื่อไม่ต้องกรอก)







Exchange: นำเข้าสินค้าจากจีน, Taobao, เฟอร์นิเจอร์, ของพรีเมี่ยม, ร่ม, ปากกา, power bank, แฟลชไดร์ฟ, กระบอกน้ำ

Load balance : Server 00
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่