using System.Runtime.InteropServices;

 

// Button Multi Line 함수
[DllImport("coredll")]
private static extern IntPtr GetCapture();
[DllImport("coredll")]
private static extern int GetWindowLong(IntPtr hWnd, int nIndex);
[DllImport("coredll")]
private static extern int SetWindowLong(IntPtr hWnd, int nIndex, int dwNewLong);
private const int GWL_STYLE = -16;
private const int BS_CENTER = 0x00000300;
private const int BS_VCENTER = 0x00000C00;
private const int BS_MULTILINE = 0x00002000;
private void SetButtonStyle(Button ctrl)
{
IntPtr hWnd;
int style;

ctrl.Capture = true;
hWnd = GetCapture();
ctrl.Capture = false;

style = GetWindowLong(hWnd, GWL_STYLE);
SetWindowLong(hWnd, GWL_STYLE, (style | BS_CENTER | BS_VCENTER | BS_MULTILINE));

ctrl.Refresh();
}

 

 

 

 

         내용복사: --enable=all --enable=style -q --template vs $(FileDir)

 

 

>path
현재 환경변수 정보 보여줌.

>set path
path명령과 동일한 현재 환경변수 정보와 동일한 path 정보와
pathext라는 시스템 실행파일 확장자 변수가 같이 나온다.

>set path =%path%;추가하고자하는경로;
ex) >set path=%path%;c:\java\bin;
환경변수 추가(일시적)

>setx path "%PATH%;추가하고자하는경로"
ex) >setx path "%PATH%;c:\MySql\include"
환경변수 추가(영구적)

%path%를 하는 이유는 현재 환경변수에 path 정보를 가져와서
현재 환경변수에 새로운 환경변수를 추가해야하기 때문입니다.

echo 명령어를 사용하면 %%를 이용하여 모든 환경변수 내용을 알아낼수 있습니다.
ex) echo %os%

 

cmd 창을 다시 띄우면 echo를 통하여 설정된 정보를 볼수 있다.

즉, 환경변수 설정은 바로 적용된다.

 

+ Recent posts