form1.vb

来自「Test a sample application」· VB 代码 · 共 16 行

VB
16
字号
Public Class Form1

    Private Wbs As New SqlEmailWebs.Service

    Private Sub btnSend_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSend.Click
        Dim ret As String = ""
        'call webservice
        ret = Wbs.SendEmail(txtTo.Text, txtFrom.Text, txtCc.Text, txtSubject.Text, txtMsg.Text)
        If ret = "OK" Then
            MsgBox("The email was sent.", MsgBoxStyle.Information, "Notification")
        Else
            MsgBox("Error: " & ret)
        End If
    End Sub
End Class

⌨️ 快捷键说明

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