월별 글 목록: 2015년 7월월

C# Zebra TCP 프린트 Code

시리얼로 뽑는거야 전부다 아실꺼공

TCP 로 하는법은.. 이제 그 기반이 되어가니깐 ZT410을 쓰기 위하여..!!

using System.Net;
 
 
private void btn_TCPIPPrint(string ZPLString)
{
	string ipAddress = "192.168.20.238";   // Test ZT410 ip
	int port = 9100;		
 
	try
	{
		// Open connection
		System.Net.Sockets.TcpClient ZT410 = new System.Net.Sockets.TcpClient();
		ZT410.Connect(ipAddress, port);
 
		// Write ZPL String to connection
		System.IO.StreamWriter ZebraPrint = new System.IO.StreamWriter(ZT410.GetStream());
 
		ZebraPrint.Write(ZPLString);
		//writer.WriteLine(ZPLString);
 
		ZebraPrint.Flush();
 
		// Close Connection
 
		ZebraPrint.Close();
		ZT410.Close();
 
	}
 
	catch (Exception ex)
	{
 
		// Catch Exception
		MessageBox.Show(ex.ToString());
	}		
}

참 쉽지용…

물론 기억을 다 못하니 메모용…

C# ComboBox SetFocus 및 DropDownList 펼치기

너무 간단인데.. 필요시에 기억이 않남…

여기라도 남겨놔야..

comboBox1.Select();
comboBox1.DroppedDown = true;