Imports System.Windows.Forms
Public Class Form1
Private Declare Function FindWindow Lib "user32.dll" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Int32
Private Declare Function FindWindowEx Lib "user32.dll" Alias "FindWindowExA" (ByVal hWnd1 As Int32, ByVal hWnd2 As Int32, ByVal lpsz1 As String, ByVal lpsz2 As String) As Int32
Private Declare Function SendMessage Lib "user32.dll" Alias "SendMessageA" (ByVal hwnd As Int32, ByVal wMsg As Int32, ByVal wParam As Int32, ByVal lParam As String) As Long
Private Const WM_SETTEXT As Int32 = &HC
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim hNote As Integer = FindWindow("Notepad", Nothing)
Dim hNoteEdit As Integer = FindWindowEx(hNote, 0, "Edit", "")
SendMessage(hNoteEdit, WM_SETTEXT, 0, "테스트중이에요 뿌잉뿌잉")
End Sub
End Class
'프로그래밍언어 > VB.NET' 카테고리의 다른 글
레지스트리 세팅저장 (0) | 2013.02.21 |
---|---|
핸들값 processID , processHanddle (0) | 2013.02.17 |
Message Queues (Windows) (0) | 2013.02.16 |
핫키 설정하기 (0) | 2013.02.14 |
비베로 치트엔진 튜토리얼8 통과하기(포인터) (0) | 2013.02.13 |