리소스 파일을 활용해보자.
우선,
1. resx 파일로 가서 Name, Value, Commnet 에 해당 내용을 삽입한다.
예) Name Value Comment
name namevalue comment information
2. form이 load되었을때, 해당 리소스로부터 정보를 가져와 보자
//////////////////////////////
using 선언
using System.Reflection;
using System.Resources;
//////////////////////////////
Assembly asm = this.GetType().Assembly;
ResourceManager rm =
new ResourceManager("WindowsFormsApplication1.Form1", asm);
string name = rm.GetString("name");
MessageBox.Show(name);
이러면 리소스에서 name을 참조하여 namevalue를 가져와 출력하는것이 가능하다
'프로그래밍 > .Net' 카테고리의 다른 글
버튼에 이미지를 넣어서 마우스 포인트 이동시 변환되도록 (0) | 2014.01.17 |
---|---|
c#에서 윈도우 메세지 보내기.. - 발췌 (0) | 2014.01.17 |
DataGridView 소개 (0) | 2014.01.17 |
DataGridView내에서 Combobox 활용 (0) | 2014.01.17 |
리소스 로드하기 (Resource Load) (0) | 2014.01.17 |