728x90
zxing.dll 파일을 이용해서 간단히 QR 코드 만드는 방법을 포스팅을 해 보겠습니다
우선 dll 파일을 참조합니다
해당 파일을 프로젝트 폴더에 넣으시고
프로젝트 참조에서 zxing.dll 파일을 참조합니다
이후 아래와 같이 코드를 작성하시면 쉽게 QR코드 생성이 가능합니다
using ZXing;
using ZXing.QrCode;
public void MakeQRCode(string strCode, PictureBox picturebox)
{
IBarcodeWriter writer = new BarcodeWriter();
writer.Format = BarcodeFormat.QR_CODE;
writer.Options.Width = picturebox.Width;
writer.Options.Height = picturebox.Height;
picturebox.Image = writer.Write(strCode);
}
코드와 picture 박스 컨트롤을 참조하면 해당 picturebox 컨트롤에 작성한 코드로 QR 코드가 생성됩니다
제 글이 도움이 되셨다면 댓글 & 공감 부탁드려요 😀
728x90
반응형
'Application > C# (WinForm)' 카테고리의 다른 글
[C# WinForm] ComboBox 텍스트 정렬 하기 (0) | 2023.10.16 |
---|---|
[C# WinForm] Panel DoubleBuffered 설정 (0) | 2023.08.21 |
[C# WinForm] Form 반 투명하게 만들기 (컨트롤 미 적용) (0) | 2023.07.24 |
[C# WinForm] 배열 랜덤 섞기 (0) | 2023.05.31 |
[C# WinForm] ListBox 오른쪽 마우스 클릭 선택 (0) | 2023.05.19 |