본문 바로가기

C# /WindowsForm35

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.
듀얼모니터 사용시 서브 모니터에 폼 크기 최대화 실행 방안 Windows Form 듀얼모니터 사용시 서브 모니터에 폼 크기 최대화 실행 방안 private void FormLocationModify() { Screen[] sc = Screen.AllScreens; this.BackColor = Color.White; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; // 듀얼모니터가 2개 이상 존재한다면 표시 창을 서브 모니터로 옮기도록 한다. (sc[0] 은 메인 모니터 ) if (sc.Length == 1) { this.WindowState = FormWindowState.Maximized; return; } this.StartPosition = FormStartPosition.Manual;.. 2016. 2. 16.