PDA

View Full Version : Lấy nội dung trong Notepad



SVPro
22-09-2008, 00:25
Mình có đoạn code thế này

Imports System.Diagnostics
Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim aaaa() As Process
aaaa = Process.GetProcessesByName("notepad")
For Each a As Process In aaaa
MessageBox.Show(a.MainWindowTitle)
Next
End Sub
End Class

Đoạn code này cho phép mình lấy nội dung tiêu đề của process notepad. Mình muốn lấy nội dung trong notepad thì như thế nào, ví dụ mình nhập vào notepad một nội dung nào đó?