C#/WinForm(35)
-
[WinForm] 관리자 권한으로 실행하기
출처:http://bywords.tistory.com/entry/C%EA%B4%80%EB%A6%AC%EC%9E%90-%EA%B6%8C%ED%95%9C-%EC%8B%A4%ED%96%89%EB%90%98%EB%8A%94-%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%A8-%EC%83%9D%EC%84%B1윈도우 Vista 버전 이후로는 관리자 권한이 중요한 key가 되었습니다. 어플리케이션에서도 마찬가지 인데요. 레지스트리 관리 등의 기능을 하기 위해서는 관리자 권한이 꼭 필요합니다. 그럼 Visual Studio 2008에서 WIndows Form Application을 관리자 권한으로 실행해 보도록 하겠습니다. 우선, 솔루션을 생성합니다. Solution Explorer 의 솔루션에서 Pro..
2013.10.07 -
[WinForm] Listview 역순으로 Add하기
리스트 뷰를 추가하다보면 항상 하던 방식인 맨아래로 추가 하는것보다 맨위에서 추가하면서 쌓아 가기를 바라는 클라이언트 들이 있다. 이때는 추가 할때 Add를 하지 말고 Insert를 해서 0번위치에 Item을 추가하는 방법을 사용한다. CommListView.Items.Insert(0, item);
2013.02.21 -
[WinForm] MDI일때 동일한 폼을 열려고 하면 포커스로
동일한 폼일 경우 포커스로 올리기private bool Search1(string formname){ foreach (Form openForm in this.MdiChildren) { if (formname.Equals(openForm.Name)) { openForm.Focus(); return false; } } return true; }
2012.08.28 -
[WinForm]MID 폼 일때 Child 모두 닫기
private bool Search(){ foreach (Form openForm in this.MdiChildren) { openForm.Close(); } return true; }
2012.08.28 -
[WinForm] 배열선언안하고 컨트롤 찾기
헤쉬테이블로 키값을 넣어도되지만 요렇게 Controls.Find()를 써도 되넹 몰랐넹 담부터 써봐야지!!Controls.Find()
2012.06.04 -
[WinForm]람다 델리게잇 익명메소드
// 대리자 정의public delegate string aDelagateFunc(string name);// 대리자와 같은 인자를 같은 함수string otherfunc(string n){ return "hello " + n;}private void button1_Click(object sender, EventArgs e){ // 대리자를 통하여 함수를 호출 aDelagateFunc del = new aDelagateFunc(otherfunc); MessageBox.Show(del("World"));} //C# 2.0 : Inline function "anonymous Methods"public delegate string aDelagateFunc2(string name);private void but..
2012.04.16