본문 바로가기

C#70

C# 사용자 정의 메시지 박스 윈폼으로 만들어 보기 -0- 기존 Windows Form 프로젝트 생성후 새 항목 추가 - Windows Form을 추가하여 위 와 같이 디자인 하였다 . 하고자 하는것은 OK , Cancel 버튼을 사용자가 정의 한 문구를 표시 하며 , 위 두가지 버튼을 눌렀을 시 DialogResult 매개변수를 받는 것이었다... DialogResult 의 값을 받기 위하여 해당 추가 폼의 Designer.cs 에 해당 부분을 추가 하였습니다. // // btnOK // this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK; this.btnOK.Location = new System.Drawing.Point(12, 72); this.btnOK.Name = "btnOK"; this.bt.. 2016. 3. 29.
C# Image TIFF 장수 확인 (페이지 카운트) /// /// TIF 이미지의 페이지 개수 (페이지 카운트)를 확인한다. /// /// /// public int GetTiffFrameCount(string imgFullPath) { int count = 0; using (System.Drawing.Image img = Image.FromFile(imgFullPath)) { count = img.GetFrameCount(FrameDimension.Page); } return count; } 2016. 3. 15.
C# 현재 실행중인 자기 자신의 파일명 정보 얻기 예제 Reflection 클래스를 이용하여 얻는 방법을 찾았습니다. using System; using System.Collections.Generic; using System.Linq; using System.Text; // using System.Reflection; using System.IO; namespace ConsoleUnitTest { class Program { static void Main(string[] args) { //전체 경로 Console.WriteLine(Assembly.GetEntryAssembly().Location); // 파일명 만 얻어오기 Console.WriteLine(Path.GetFileName(Assembly.GetEntryAssembly().Location)); .. 2016. 3. 7.
C# Winform EXE 실행시 관리자 모드로 실행 본인이 찾은 방법으로 해결이 안될 수 있습니다 죄송합니다 -_-;; 1. 프로젝트 새 항목 추가 - app.menifest 2. app.menifest 내용 변경 로 변경 하였습니다. 2016. 3. 7.