怎么用 vb调用windows里的拨号程序

flaredog 2001-12-08 09:52:03
怎么用 vb调用windows里的拨号程序。
使用哪些dll文件啊。我先谢谢各位
...全文
107 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
flaredog 2001-12-09
  • 打赏
  • 举报
回复
哎呀,是英文网啊,看不懂了
上面的
'**************************************
' Name: Automatic Internet Dialup
' Description:Most code snippets simply
' show you how to display
a connect dialog. The problem With this is that
it doesn't force a dial-up and won't alert you
when a connection is established.
This code solves those problems by using Internet
Explorer's own 'automatic dial-up' settings
(Control Panel >> Internet options >> Connections).
It utilises two little-known API calls that can
automatically connect / disconnect from the
default connection.
Note: If the 'Never Dial a Connection' option is


selected, this code will Not be able To connect.
I came across this API awhile ago when my friend
suggested a forced dialup and gave me this tip.
It's actually pretty helpful.
' By: Bradley Liang
'
'This code is copyrighted and has' limited warranties.Please see http://w
' ww.Planet-Source-Code.com/xq/ASP/txtCode
' Id.9359/lngWId.1/qx/vb/scripts/ShowCode.
' htm'for details.'**************************************

' !! Dial the Net Automatically !!
' This waits until the connection is mad
' e and THEN
' proceeds. --Bradley Liang
是贴在哪的,我是新手,对不起哦,请说的详细点,好吗,谢
flaredog 2001-12-09
  • 打赏
  • 举报
回复
谢谢,谢谢大家的帮助
Paperback 2001-12-08
  • 打赏
  • 举报
回复
不好意思意思,忘了声明部分
'**************************************
'Windows API/Global Declarations for :Au
' tomatic Internet Dialup
'**************************************
Private Const INTERNET_AUTODIAL_FORCE_ONLINE = 1
Private Const INTERNET_AUTODIAL_FORCE_UNATTENDED = 2


Private Declare Function InternetAutodial Lib "wininet.dll" _
(ByVal dwFlags As Long, ByVal dwReserved As Long) As Long


Private Declare Function InternetAutodialHangup Lib "wininet.dll" _
(ByVal dwReserved As Long) As Long

Bardo 2001-12-08
  • 打赏
  • 举报
回复
源代码在:
www.codeguru.com
Bardo 2001-12-08
  • 打赏
  • 举报
回复
源代码在:
www.codeguru.com
Paperback 2001-12-08
  • 打赏
  • 举报
回复
[转贴]
'**************************************
' Name: Automatic Internet Dialup
' Description:Most code snippets simply
' show you how to display
a connect dialog. The problem With this is that
it doesn't force a dial-up and won't alert you
when a connection is established.
This code solves those problems by using Internet
Explorer's own 'automatic dial-up' settings
(Control Panel >> Internet options >> Connections).
It utilises two little-known API calls that can
automatically connect / disconnect from the
default connection.
Note: If the 'Never Dial a Connection' option is


selected, this code will Not be able To connect.
I came across this API awhile ago when my friend
suggested a forced dialup and gave me this tip.
It's actually pretty helpful.
' By: Bradley Liang
'
'This code is copyrighted and has' limited warranties.Please see http://w
' ww.Planet-Source-Code.com/xq/ASP/txtCode
' Id.9359/lngWId.1/qx/vb/scripts/ShowCode.
' htm'for details.'**************************************

' !! Dial the Net Automatically !!
' This waits until the connection is mad
' e and THEN
' proceeds. --Bradley Liang


Private Sub Command1_Click()
'To prompt the user to connect to the Ne
' t


If InternetAutodial(INTERNET_AUTODIAL_FORCE_ONLINE, 0) Then
MsgBox "You're Connected!", vbInformation
End If
'To automatically start dialling


If InternetAutodial(INTERNET_AUTODIAL_FORCE_UNATTENDED, 0) Then
MsgBox "You're Connected!", vbInformation
End If
'To disconnect an automatically dialled
' connection


If InternetAutodialHangup(0) Then
MsgBox "You're Disconnected!", vbInformation
End If
End Sub

7,778

社区成员

发帖
与我相关
我的任务
社区描述
VB 基础类
社区管理员
  • VB基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧