전체 글

전체 글

    RoundRect - 모서리가 둥근 사각형 그리기

    RoundRect함수는 모서리가 둥근 사각형을 그리는 함수입니다. Declare Function RoundRect Lib "gdi32" Alias "RoundRect" (ByVal hdc As Integer, ByVal x1 As Integer, ByVal y1 As Integer, ByVal x2 As Integer, ByVal y2 As Integer, ByVal x3 As Integer, ByVal y3 As Integer) As Integer ▶VB.NET 선언 [DllImport("gdi32")] public static extern int RoundRect(int hdc, int x1, int y1, int x2, int y2, int x3, int y3); ▶C# 선언 RoundRect함수의..

    BitBlt - 지정된 영역을 Bitmap복사

    BitBlt함수는 인수로 지정된 해당 Device Context의 특정 영역을 Bitmap으로 복사하는 함수입니다. Declare Function BitBlt Lib "gdi32" Alias "BitBlt" (ByVal hDestDC 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 dwRop As Integer) As Integer ▶VB.NET 선언 [DllImport("gdi32")] public static extern int B..

    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#