# Re: 我想让vb可与外部的程式程连结，我该怎么做??

Posted by maxwell on February 16, 1999 at 00:29:43:

In Reply to: 我想让vb可与外部的程式程连结，我该怎么做?? posted by 渊仔 on February 15, 1999 at 02:30:04:

: 我要让我做好的vb程式可与某一个 .exe 档的程式做连结，那该~~
是在程式中呼叫吗? 用 shell 就可以了..
如果是执行另外一个程式所产生的档案(例如 .doc 想直接用 word 开启) 用 shellexecute (win32api) 一样可以..
:
: 还有，vb 也可像 网页 一样可做超连结吗，如果可以，教一下吧
: 谢谢
您可以利用 shellexecute 来做连结,
附上我的范例给您参考:
Public Const SW_SHOWMINIMIZED = 2
Public Const SW_SHOWMAXIMIZED = 3
Public Const SW_SHOW = 5

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

ShellExecute Me.hwnd, "open", "http://www.senao.net", "", "", SW_SHOWMAXIMIZED

Follow Ups: