查看: 291  |  回复: 0
VB6 代码太长怎么办,用空格+下划线换行
楼主
发表于 2023年5月11日 23:30

VB6的程序中,如果一行太长,就用空格+下划线换行。

新建From1(窗体),新建Command1(按钮CommandButton),代码:

Private Sub Command1_Click()
    Dim str As String
    str = "Ma" & _
          "Nong" & _
          "Ku" & _
          ".com"
    MsgBox str
End Sub

试试效果就是显示:

MaNongKu.com


您需要登录后才可以回帖 登录 | 立即注册
【本版规则】请勿发表违反国家法律的内容,否则会被冻结账号和删贴。
用户名: 立即注册
密码:
2020-2024 MaNongKu.com