Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[VB] 怪..MailTo 竟不能..

0 views
Skip to first unread message

Cheng Tom

unread,
May 2, 1998, 3:00:00 AM5/2/98
to

>> 本信是由 學術網-程式設計區 交叉投遞

_作者:chen...@mail.tceb.edu.tw

Hi..
在下參考一些文件寫了一個超連結 & MailTo 的功能,
卻發現會有問題..

我先宣告:

Option Explicit
Private 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
Private Const SW_SHOW = 5

宣告完畢,我弄了個控制項出來,在事件中使用:

Private Sub Label10_Click()
Call ShellExecute(Me.hWnd, open, http://miau.cs.ccu.edu.tw/3u/, , , SW_SHOW)
End Sub

Private Sub Label11_Click()
Call ShellExecute(Me.hWnd, open, mailto:3...@ms7.accmail.com.tw, , , SW_SHOW)
End Sub

但是卻總是會有一堆錯誤...
為啥呢?

.. 民間撥接式BBS-專業程式設計資源站:(04)246-3795 三優資訊站
--- News Gateway 0.07+
* Origin: TeaTime BBS 886-2-2245-3105, News <=> BBS Gateway (1:1/9.0)

小翰

unread,
May 3, 1998, 3:00:00 AM5/3/98
to

==> news...@teatime.lifenet.com.tw (Cheng Tom) 在 oop 版提到:
: _作者:chen...@mail.tceb.edu.tw

: Hi..
: 在下參考一些文件寫了一個超連結 & MailTo 的功能,
: 卻發現會有問題..
: 我先宣告:
: Option Explicit
: Private 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

: Private Const SW_SHOW = 5
: 宣告完畢,我弄了個控制項出來,在事件中使用:
: Private Sub Label10_Click()
: Call ShellExecute(Me.hWnd, open, http://miau.cs.ccu.edu.tw/3u/, , , SW_SHOW
: End Sub

: Private Sub Label11_Click()
: Call ShellExecute(Me.hWnd, open, mailto:3...@ms7.accmail.com.tw, , , SW_SHOW)
: End Sub
: 但是卻總是會有一堆錯誤...
: 為啥呢?
: ... 民間撥接式BBS-專業程式設計資源站:(04)246-3795 三優資訊站

: --- News Gateway 0.07+
: * Origin: TeaTime BBS 886-2-2245-3105, News <=> BBS Gateway (1:1/9.0)

是什麼錯誤?
ShellExecute 的第2,3參數是字串型態
第4,5參數不是選擇性的,至少要傳入空字串
--
VB notebook updates every week.
http://www.taconet.com.tw/~Jaric
Last Updated:5/1/98

0 new messages