본문 바로가기

C# /WindowsForm35

[C#] 특정폴더안의 이미지 파일들을 Tiff 파일로 Merge 예제 [C#] 특정폴더안의 이미지 파일들을 Tiff 파일로 Merge 예제 특정 폴더안의 이미지만 존재시 해당 폴더안에 Merge.tif 라는 파일을 생성하여 Merge 하는 예제입니다. Merge 대상이 Tiff 파일의 경우 첫장만 병합됩니다 -_-;; 내용이 부족해 죄송합니다. using System; using System.Collections.Generic; using System.Text; // using System.Drawing; using System.IO; using System.Drawing.Imaging; using System.Linq; namespace ImageMergeTest { class Program { static void Main(string[] args) { Console... 2017. 2. 7.
C# UseShellExecute를 이용하여 Process 호출 간단한 예제 예제가 이번에도 많이 허접합니다 죄송합니다. -_-;; 예제는 엑셀 파일을 인쇄하거나 오픈하는 부분입니다.. // 인쇄하면 ShellExecute로 Print // 미리보기하면 ShellExecute로 Open string excelPath = excelResult.Split('^')[1]; ProcessStartInfo processStart = new ProcessStartInfo(); processStart.FileName = excelPath; processStart.UseShellExecute = true; if (p == PrintInfo.Print) processStart.Verb = "print"; else processStart.Verb = "open"; Process.Start(proc.. 2016. 8. 5.
C# 확장메서드 파일 잠김 여부 확인 -0- 구글에서 검색하다보니 아래 방법을 찾았습니다 -0- /// /// 해당 파일이 잠겨 있는지 여부를 확인하도록 합니다. /// /// /// public static bool thisFileLocked(this string fileFullPath) { try { using (File.Open(fileFullPath, FileMode.Open)) { } } catch(IOException er) { int errCode = Marshal.GetHRForException(er) & ((1 2016. 3. 29.
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.