본문 바로가기

VB

(17)
[C#] Resize Form with none border style protected override void WndProc(ref Message m) { if (m.Msg == 0x84) { // Trap WM_NCHITTEST Point pos = new Point(m.LParam.ToInt32() & 0xffff, m.LParam.ToInt32() >> 16); pos = this.PointToClient(pos); if (pos.Y = this.ClientSize.Width - cGrip && pos.Y >= this.ClientSize.Height - cGrip) { m.Result = (IntPtr)17; // HTBOTTOMRIGHT ..
[.NET]INI File Class ' Programmer: Ludvik Jerabek ' Date: 08\23\2010 ' Purpose: Allow INI manipulation in .NET Imports System.IO Imports System.Text.RegularExpressions Imports System.Collections Imports System.Diagnostics ' IniFile class used to read and write ini files by loading the file into memory Public Class IniFile ' List of IniSection objects keeps track of all the sections in the INI file Private m_sections..
느낌표 연산자 (Bang, Lookup Operator) 비주얼 베이직에는 Bang이라는연산자가 있습니다... 저도 오랫만에 MSDN 포럼에 질문이 올라와있어서 생각나 포스팅해봅니다. 일단 이 연산자는 ADO 참조의 Recordset에서 사용의 예를 볼 수 있습니다. rsRecord!ID = "0012145" rsRecord!CompanyName = "devflow, Inc." rsRecord!CustomName = "Ahn" 위 코드들은 아래와 같은 역활을 합니다.. rsRecord("ID") = "0012145" rsRecord("CompanyName") = "devflow, Inc." rsRecord("CustomName") = "Ahn" 또한 아래와 같이 됩니다. rsRecord.Fields("ID") = "0012145" rsRecord.Fields(..
Alpha-blend transparency form (PNG 파일 alpha로 form투명화) 아래는 class입니다.Imports SystemImports System.DrawingImports System.Drawing.ImagingImports System.Windows.FormsImports System.Runtime.InteropServices'Translation from C# by Dj Den4ikPublic Class PerPixelAlphaForm 'Implements Windows.Forms.IWin32Window Public Structure ARGB Public Blue As Byte Public Green As Byte Public Red As Byte Public Alpha As Byte End Structure Public Structure BLENDFUNCTION Pu..
AOBSCAN Function at vb.net Public Declare Function OpenProcess Lib "KERNEL32" _ (ByVal DesiredAccess As Int32, _ ByVal InheritHandle As Boolean, _ ByVal ProcessId As Int32) _ As Int32 Private Declare Function ReadProcessMemory Lib "KERNEL32" _ (ByVal Handle As Int32, _ ByVal address As Int32, _ ByRef Value As Int32, _ Optional ByVal Size As Int32 = 4, _ Optional ByVal lpNumberOfBytesWritten As Int64 = 0) _ As Long Public ..
vb.net 프로세스 리스트 가져오기 .net으로 전향되면서 많은 기능들이 자체적으로 생겼습니다. Dim ProcessList As System.Diagnostics.Process() ProcessList = System.Diagnostics.Process.GetProcesses() Dim Proc As System.Diagnostics.Process For Each Proc In ProcessList If Proc.ProcessName = "notepad" Then MsgBox("Detected") Next Proc의 멤버로 통해 pid, handle, path 등등 많은 정보를 얻을 수 있습니다.
[vb.net] Listview 정렬하기 (오름차순 내림차순) 보통 listview는 자체적으로 sort를 통하여 none과 오룸, 내림순으로 정렬할 수 있다.하지만 sort에 none이 아닌 다른설정을 주게된다면.. 사용자 임의로 리스트 재정렬(?)을 할 수 없다.즉, 값이 바뀔때마다 계속 listview는 아이템을 sort해준다. 필요에따라 위치를 변경 할 수 있게끔 자동 sort를 대체할만한 메서드를 만들어보았다. Public Sub ListViewSort(ByRef lv As ListView, ByVal col As Integer, ByVal AceDec As Boolean) Dim lvTempItem As ListViewItem Dim i As Integer If AceDec Then For i = 0 To lv.Items.Count - 2 If CStr(..
[vb.net] Base64 Encode Decode (인코딩, 디코딩) 네트워크라던지 웹프로그래밍할때 많이 사용하는 base64인코딩과 디코딩을 하는방법입니다.방법은 닷넷에서 제공하는 Converter를 사용합니다. * 인코딩 Dim nByte As Byte() nByte = Encoding.UTF8.GetBytes(텍스트) Convert.ToBase64String(nByte) * 디코딩 Dim nByte As Byte() nByte = Convert.FromBase64String(텍스트) Encoding.UTF8.GetString(nByte)