WPF에서 MainWindow HWND값이 필요한 경우, 아래와 같이 사용가능하다.



MainWindow mainWindow = Application.Current.MainWindow as MainWindow;



*출처 : http://zanim.tistory.com/entry/WPF-MainWindow-HWND-%EA%B0%80%EC%A0%B8%EC%98%A4%EA%B8%B0

'STUDY > WPF & C#' 카테고리의 다른 글

[C#] Unsafe code may only appear if compiling with /unsafe  (0) 2017.01.12

[Solution Explorer] => [Properties] => [Build]

check "Allow unsafe code"



'STUDY > WPF & C#' 카테고리의 다른 글

[WPF] get MainWindow HWND  (0) 2017.01.13

파일 (File)을 열어 보겠습니다.


< 리눅스 (Linux / Ubuntu) >


< 명렁어 (Command) >

커맨드 (Command)에서 파일을 실행 명령어는 아래와 같습니다.


open


쉽게 열어라 (open) 입니다.



< 사용 방법 (Usage) >

사용 방법은 아래와 같습니다.


open file_or_folder


즉, 명령어 (open) 뒤에 있는 파일 (file) 혹은 폴더  (folder)를 실행해라입니다.  



< 예제 (Example) >

1. 예제 파일 (test.txt)를 실행은 아래와 같습니다.


open test.txt


2. 예제 폴더 (~/Desktop) 실행은 아래와 같습니다.


open ~/Desktop



< 윈도우즈 (Windows) >

윈도우즈는 명령어 "edit"이며, 실행 방법은 동일합니다.

+ Recent posts