Date: 02-16-2022
Return to Index
created by gbSnippets
'Compilable Example: (Jose Includes)
#Compile Exe
#Dim All
#Include "Win32API.inc"
Global hDlg As Dword
Function PBMain() As Long
Dialog New Pixels, 0, "Test Code",300,300,200,200, %WS_OverlappedWindow To hDlg
Control Add Button, hDlg, 100,"Push", 50,10,100,20
Dialog Show Modal hDlg Call DlgProc
End Function
CallBack Function DlgProc() As Long
If Cb.Msg = %WM_Command And Cb.Ctl = 100 And Cb.CtlMsg = %BN_Clicked Then
If InternetConnection Then ? "Connected" Else ? "Not Connected"
End If
End Function
Function InternetConnection() As Long
Tcp Open "http" At "www.google.com" As #1
If Err = 0 Then Function = 1
Tcp Close #1
End Function
'gbs_01300
'Date: 05-11-2013
http://www.garybeene.com/sw/gbsnippets.htm