Click here to Skip to main content
16,010,488 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Generalsendmessage woes..... Pin
ns24-Sep-02 10:32
ns24-Sep-02 10:32 
GeneralRe: sendmessage woes..... Pin
Nick Parker24-Sep-02 11:42
protectorNick Parker24-Sep-02 11:42 
GeneralRe: sendmessage woes..... Pin
ns25-Sep-02 0:55
ns25-Sep-02 0:55 
General3rd Party Components Pin
Anonymous24-Sep-02 5:02
Anonymous24-Sep-02 5:02 
QuestionVB runtime - how to distribute? Pin
ns24-Sep-02 1:33
ns24-Sep-02 1:33 
AnswerRe: VB runtime - how to distribute? Pin
Nick Parker24-Sep-02 2:46
protectorNick Parker24-Sep-02 2:46 
GeneralInternet Pin
Anonymous23-Sep-02 19:24
Anonymous23-Sep-02 19:24 
GeneralRe: Internet Pin
Nick Parker24-Sep-02 1:30
protectorNick Parker24-Sep-02 1:30 
Try something like this, there are actually several ways to check for something like this, but they all differ slightly.

Private Const INTERNET_CONNECTION_CONFIGURED = &H40
Private Const INTERNET_CONNECTION_LAN = &H2
Private Const INTERNET_CONNECTION_MODEM = &H1
Private Const INTERNET_CONNECTION_OFFLINE = &H20
Private Const INTERNET_CONNECTION_PROXY = &H4
Private Const INTERNET_RAS_INSTALLED = &H10
Private Declare Function InternetGetConnectedState Lib "wininet.dll" (ByRef lpdwFlags As Long, ByVal dwReserved As Long) As Long
Private Sub Form_Load()
    Dim Ret As Long
    Me.AutoRedraw = True
    
    'retrieve the connection status
    InternetGetConnectedState Ret, 0&
    
    'show the result
    If (Ret And INTERNET_CONNECTION_CONFIGURED) = INTERNET_CONNECTION_CONFIGURED Then Me.Print "Local system has a valid connection to the Internet, but it may or may not be currently connected."
    If (Ret And INTERNET_CONNECTION_LAN) = INTERNET_CONNECTION_LAN Then Me.Print "Local system uses a local area network to connect to the Internet."
    If (Ret And INTERNET_CONNECTION_MODEM) = INTERNET_CONNECTION_MODEM Then Me.Print "Local system uses a modem to connect to the Internet."
    If (Ret And INTERNET_CONNECTION_OFFLINE) = INTERNET_CONNECTION_OFFLINE Then Me.Print "Local system is in offline mode."
    If (Ret And INTERNET_CONNECTION_PROXY) = INTERNET_CONNECTION_PROXY Then Me.Print "Local system uses a proxy server to connect to the Internet."
    If (Ret And INTERNET_RAS_INSTALLED) = INTERNET_RAS_INSTALLED Then Me.Print "Local system has RAS installed."
End Sub


Nick Parker

The goal of Computer Science is to build something that will last at least until we've finished building it. - Unknown



GeneralPlease help Pin
Member 103967023-Sep-02 15:57
Member 103967023-Sep-02 15:57 
GeneralRe: Please help Pin
Nick Parker24-Sep-02 2:46
protectorNick Parker24-Sep-02 2:46 
GeneralBackcolour in VB6 Pin
Sas2808198623-Sep-02 9:52
Sas2808198623-Sep-02 9:52 
GeneralRe: Backcolour in VB6 Pin
Nick Parker23-Sep-02 12:12
protectorNick Parker23-Sep-02 12:12 
GeneralRe: Backcolour in VB6 Pin
Sas280823-Sep-02 21:42
sussSas280823-Sep-02 21:42 
GeneralSelecting text in WebBrowser control Pin
Hans Ruck22-Sep-02 23:00
Hans Ruck22-Sep-02 23:00 
GeneralWant red rectangles: Pin
ns22-Sep-02 3:13
ns22-Sep-02 3:13 
GeneralRe: Want red rectangles: Pin
Nick Parker22-Sep-02 15:53
protectorNick Parker22-Sep-02 15:53 
GeneralDrawing disappears on modal form Pin
ns22-Sep-02 3:12
ns22-Sep-02 3:12 
GeneralRe: Drawing disappears on modal form Pin
Nick Parker22-Sep-02 16:05
protectorNick Parker22-Sep-02 16:05 
GeneralManaging my own EventLog Pin
sybux200021-Sep-02 22:56
sybux200021-Sep-02 22:56 
Generalshared memory Pin
nss21-Sep-02 2:40
nss21-Sep-02 2:40 
GeneralRe: shared memory Pin
Nick Parker22-Sep-02 16:12
protectorNick Parker22-Sep-02 16:12 
GeneralRe: shared memory Pin
ns24-Sep-02 1:29
ns24-Sep-02 1:29 
GeneralRe: shared memory Pin
Throttles25-Sep-02 10:39
Throttles25-Sep-02 10:39 
QuestionHow do I update methods and properties in VBA? Pin
Member 9620-Sep-02 12:26
Member 9620-Sep-02 12:26 
Generalsendmessage not sending in VB dll: Pin
ns20-Sep-02 12:01
ns20-Sep-02 12:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.