⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 module1.bas

📁 这里有很多很实用的VB编程案例,方便大家学习VB.
💻 BAS
字号:
Attribute VB_Name = "Module1"
Option Explicit
Const EM_GETLINE = &HC4
Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long

 Public Function getlinetext(Text1 As TextBox, ByVal ntx As Long) As String
    Dim str1(255) As Byte
    Dim str2 As String, i As Long
    str1(0) = 255
    i = SendMessage(Text1.hwnd, EM_GETLINE, ntx, str1(0))
    If i = 0 Then
        getlinetext = ""
    Else
        str2 = StrConv(str1, vbUnicode)
        getlinetext = Left(str2, InStr(1, str2, Chr(0)) - 1)
    End If
 End Function

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -