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 Sub Label1_Click(Index As Integer)
Select Case Index
Case 3
ret& = ShellExecute(PropertyPage.hwnd, "Open", "mailto:[email protected]", "", App.Path, 1)
Case 4
ret& = ShellExecute(PropertyPage.hwnd, "Open", "http://www.d1vb.com", "", App.Path, 1)
Case 5
ret& = ShellExecute(PropertyPage.hwnd, "Open", "http://dyqing.533.net", "", App.Path, 1)
Case 6
ret& = ShellExecute(PropertyPage.hwnd, "Open", "http://go8.163.com/dbcontrols", "", App.Path, 1)
End Select
End Sub

解决方案 »

  1.   

    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
    ===================================================================
    d = ShellExecute(Me.hwnd, "Open", "mailto:[email protected]", "", App.Path, 1)
      

  2.   

    没那么麻烦!看我的代码:shell "start mailto:[email protected]",5运行后给我发邮件,呵呵
      

  3.   

    Chice_wxg(我怕谁?我是谁!我是流氓我最贼。) 
    你的方法有时候不能用,如:在控件的属性页里面,不信你试一试。
      

  4.   

    呵呵,能简单就简单嘛!Windows提供了这个功能干吗不用?而且他不是在做控件呀!不过平时我也经常用
    ShellExecute hwnd, "Open", "mailto:[email protected]", "", "", 5
    ShellExecute hwnd, "Open", "http://nomey.myetang.com/", "", "", 5
    通用方法。
      

  5.   

    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
    Const SW_SHOWNORMAL = 1
    Private Sub Form_Load()
        'KPD-Team 1998
        'URL: http://www.allapi.net/
        'E-Mail: [email protected]
        'Send an E-Mail to the KPD-Team
        ShellExecute Me.hwnd, vbNullString, "mailto:[email protected]", vbNullString, "C:\", SW_SHOWNORMAL
    End Sub
      

  6.   

    如果系统磨人的邮件系统使FoxMail4.0,有办法将在程序中指定的邮件地址直接反映到Foxmail“写邮件”的收件人地址里吗?
      

  7.   

    2:Chice_wxg(我怕谁?我是谁!我是流氓我最贼。) 
    如果用你上面的方法是行不通的,我试过不下十几次了,它只是简简单单的打开了Foxmail4.0。有没有别的办法?
      

  8.   


    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 LongPrivate Sub Command1_Click()
    ShellExecute Me.hwnd, "", "MAILTO:我的信箱", "", "", 3
    End Sub