主题:将文本框的内容自动添加至邮件内容中
各位老师:
以下语句可以正常调用系统安装的邮件处理软件,并将E-mail地址添加至收件人中。我想将一个文本框的值写入至邮件中,写入至标题栏中也不知道,望指点一下,谢谢
ShellExecute 0, "Open", "mailto:gxiaofei@tom.com" & "", "", "", SW_SHOWNORMAL
Public Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
(ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, _
ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Public Const SW_SHOWNORMAL = 1
还有另外一个问题,是用来侦测当前大写字母键状态,以下语句当手工每按一次是正确的,但不按大写字母锁定键,则结果不一定是正确的
Public Declare Function GetAsyncKeyState Lib "user32.dll" (ByVal vKey As Long) As Integer
Private Sub txtPassword_GotFocus()
If GetAsyncKeyState(vbKeyCapital) Then
txtPassword.ToolTipText ="当前大写字母键处于打开状态"
End If
End Sub
以下语句可以正常调用系统安装的邮件处理软件,并将E-mail地址添加至收件人中。我想将一个文本框的值写入至邮件中,写入至标题栏中也不知道,望指点一下,谢谢
ShellExecute 0, "Open", "mailto:gxiaofei@tom.com" & "", "", "", SW_SHOWNORMAL
Public Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
(ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, _
ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Public Const SW_SHOWNORMAL = 1
还有另外一个问题,是用来侦测当前大写字母键状态,以下语句当手工每按一次是正确的,但不按大写字母锁定键,则结果不一定是正确的
Public Declare Function GetAsyncKeyState Lib "user32.dll" (ByVal vKey As Long) As Integer
Private Sub txtPassword_GotFocus()
If GetAsyncKeyState(vbKeyCapital) Then
txtPassword.ToolTipText ="当前大写字母键处于打开状态"
End If
End Sub