怎样判断计算机是否连接互联网
解决方案 »
- "0x779bb794"指令引用的"0x00070d5a"内存。该内存不能为"writen"。
- keybd_event组合按键问题 200分求救
- 我想做一个生产安排程序。有一个时间段,如:9:00-11:00 同时又有另一个时间段 10:00-12:00。如何判断这两个时间段发生了冲突!
- VB字符串合并连接问题!问高手!
- 在toobar里面图标显示得太小了。 然后我看到了在toolbar 里面有个buttonheigh 属性, 但它的值却改不了, 请问怎样修改?
- VB中有无延时的命令或函数?是什么?如何用?
- 函数用法?
- 我的系统中为何没有microsoft script runtime啊???
- ado的问题??求救!!!高分!!!
- vb5.0一个程序数据已精确到分,但有时候会少一分钱
- 如何用API进行串口通讯操作,不使用控件
- 如何在datagrid或msflexgrid的一列中显示图片啊?
发一段信息到某著名网站,若有反应,则说明在网上。
具体实现:
先引用Microsoft Internet Transfer 控件
名为Inet1
Dim strT As String
strT = Me.Inet1.OpenURL("www.sina.com")
If strT = "" Then
MsgBox "no"
Else
MsgBox "ok"
End If
Private Declare Function InternetGetConnectedState Lib "wininet.dll" (ByRef lpdwFlags As Long, ByVal dwReserved As Long) As Long
Public Function IsConnected() As Boolean
If InternetGetConnectedState(0&, 0&) = 1 Then
IsConnected = True
Else
IsConnected = False
End If
End Function
不过要ie4。0以上
不管上不上網都是True