Option Explicit
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Const EM_GETLINE = &HC4Private Sub Command1_Click()
Dim str1(250) As Byte'这里为什么要定义成数组
Dim str3 As String
Dim str2 As String * 250
str1(0) = 250'这里赋值是怎么回事?
Dim i As Long
SendMessage Text1.hwnd, EM_GETLINE, 1, str1(0)
str2 = StrConv(str1, vbUnicode)
str3 = Left(str2, InStr(1, str2, Chr(0)) - 1)
MsgBox (str3)
End Sub
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Const EM_GETLINE = &HC4Private Sub Command1_Click()
Dim str1(250) As Byte'这里为什么要定义成数组
Dim str3 As String
Dim str2 As String * 250
str1(0) = 250'这里赋值是怎么回事?
Dim i As Long
SendMessage Text1.hwnd, EM_GETLINE, 1, str1(0)
str2 = StrConv(str1, vbUnicode)
str3 = Left(str2, InStr(1, str2, Chr(0)) - 1)
MsgBox (str3)
End Sub
解决方案 »
- 请问如何调用并使用jmail.dll?
- 心情好,散分
- 急!在线等!VB中怎样把Text控件中的内容添加到DataGrid控件中.谢谢!
- vb6.0中文版打不上补丁,是不是要下载中文版的补丁?
- 请教:如何实现对richtextbox现文本后面追加写入的内容,或者:如何将richtextbox文本文件中的光标定位到文件尾部?
- 急呀~~~~帮帮忙。关于十进制和十六进制的转换问题
- 关于listview的subitems(0)的问题!急需解决!!!
- 如何用VB语言来实现CRC校验函数? 朋友会的话,请回复好么?谢谢!!!
- 我怎么才能控制记录条数?(Access数据库)(sureli)------2
- 各位大师兄谁会用 VB编个发送Email程序小弟 正为之发愁 年都过不好
- 如何使用程序设置treeview控件选择的结点
- 如何focus 在 含有 "halloworld" 為title 的程序上
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Const EM_GETLINE = &HC4 Private Sub Command1_Click()
Dim str1(250) As Byte'这里为什么要定义成数组 因为这个参数要作为指针传送,声明为数组比较方便(自然是指针)
Dim str3 As String
Dim str2 As String * 250
str1(0) = 250'这里赋值是怎么回事? (这里给出行的最大长度)
Dim i As Long
SendMessage Text1.hwnd, EM_GETLINE, 1, str1(0)
str2 = StrConv(str1, vbUnicode)
str3 = Left(str2, InStr(1, str2, Chr(0)) - 1)
MsgBox (str3)
End Sub