.NET

    ShowCursor - Mouse Cursor의 숨김/해제

    ShowCursor함수는 전달된 인수에 따라 Mouse Cursor를 숨기거나 숨김을 해제하는 함수입니다. Declare Function ShowCursor Lib "user32" Alias "ShowCursor" (ByVal bShow As Boolean) As Integer ▶VB.NET 선언 ShowCursor(False/True) ▶VB.NET 호출 [DllImport("user32.dll")] public static extern int ShowCursor(bool bShow); ▶C# 선언 ShowCursor(false/true); ▶C# 호출 인수가 false이면 숨김, true이면 숨김해제 입니다. 또한 ShowCursor함수에 의해 Mouse Cursor가 숨겨진 상태라 하더라도 Mous..

    StretchBlt - 지정된 영역을 Bitmap복사

    StretchBlt함수는 지정된 Device Context영역을 Bitmap복사합니다. 이 기능은 BitBlt함수와 같지만 StretchBit함수는 복사된 Bitmap을 늘이거나 축소하고 좌우대칭을 바꾸는등의 추가적인 작업이 가능합니다. Declare Function StretchBlt Lib "gdi32" Alias "StretchBlt" (ByVal hdc As Integer, ByVal x As Integer, ByVal y As Integer, ByVal nWidth As Integer, ByVal nHeight As Integer, ByVal hSrcDc As Integer, ByVal xSrc As Integer, ByVal ySrc As Integer, ByVal nSrcWidth As In..

    GetLocalTime - System상의 지역과 관련된 날짜및 시간구하기

    GetLocalTime함수는 현재 Windows System상에 설정된 지역에 따른 날짜및 시간을 반환하는 함수입니다. Declare Sub GetLocalTime Lib "kernel32" Alias "GetLocalTime" (ByRef lpSystemTime As SYSTEMTIME) ▶VB.NET 선언 [DllImport("kernel32")] public static extern void GetLocalTime(ref SYSTEMTIME lpSystemTime); ▶C# 선언 SYSTEMTIME는 반환되는 날짜및 시간을 저장할 구조체를 의미합니다. 이 구조체는 8개의 Member로 다음과 같이 선언되어야 합니다. Public Structure SYSTEMTIME Public wYear As Sh..

    DeleteFile - File삭제

    DeleteFile함수는 지정한 File을 삭제하는 함수입니다. Declare Function DeleteFile Lib "kernel32" Alias "DeleteFileA" (ByVal lpFileName As String) As Integer ▶VB.NET 선언 [DllImport("kernel32")] public static extern int DeleteFile(string lpFileName); ▶C# 선언 DeleteFile함수는 삭제할 File의 이름과 경로를 인수로 지정하면 됩니다. 예를 들어 C Dirve의 aaa.txt File을 삭제하려면 함수를 다음과 같이 호출할 수 있습니다. DeleteFile("C:\aaa.txt") ▶VB.NET 호출 DeleteFile("C:\\aaa.t..

    RemoveDirectory - 지정한 Folder 삭제

    RemoveDirectory함수는 특정 Folder를 삭제합니다. Declare Function RemoveDirectory Lib "kernel32" Alias "RemoveDirectoryA" (ByVal lpPathName As String) As Integer ▶VB.NET 선언 [DllImport("kernel32")] public static extern int RemoveDirectory(string lpPathName); ▶C# 선언 함수의 인수로는 삭제할 Folder의 위치만 건네주면 됩니다. 예를 들어 'C:\'의 'AAA' Folder를 삭제하려면 RemoveDirectory 함수를 다음과 같이 선언합니다. RemoveDirectory("C:\aaa") ▶VB.NET 호출 Remove..

    GetSystemDirectory - Windows System Directory

    GetSystemDirectory함수는 Windows System Directory경로명을 반환합니다. 이 API대신 다음 .NET Class Library를 사용하십시오. Imports System.Environment SystemDirectory ▶VB.NET using System; Environment.SystemDirectory ▶C#

    SetWindowPos - Window종류및 크기와 표시 Level변경

    SetWindowPos함수는 Window의 형태, 크기, 표시Leve등 Window의 속성을 변경하는 함수입니다. Declare Function SetWindowPos Lib "user32" Alias "SetWindowPos" (ByVal hwnd As Integer, ByVal hWndInsertAfter As Integer, ByVal x As Integer, ByVal y As Integer, ByVal cx As Integer, ByVal cy As Integer, ByVal wFlags As Integer) As Integer ▶VB.NET 선언 [DllImport("user32")] public static extern int SetWindowPos(int hwnd, int hWndInser..

    GetSysColor - System 설정 색상정보

    Declare Function GetSysColor Lib "user32" Alias "GetSysColor" (ByVal nIndex As Integer) As Integer ▶VB.NET 선언 GetSysColor(X) ▶VB.NET 호출 [System.Runtime.InteropServices.DllImport("user32.dll")] private static extern int GetSysColor(int nIndex); ▶C# 선언 GetSysColor(X).ToString(); ▶C# 호출 인수값 반환값 0 윈도우 스크롤바 색상 1 윈도우 배경색상 2 윈도우 타이틀바 색상(활성화된 경우) 3 윈도우 타이틀바 색상(비활성화된 경우) 4 윈도우 메뉴 색상 5 윈도우 색상 6 - 7 메뉴의 텍스..