Check Connection
This code will check if a connection is opened to the internet , if not , it will show a messagebox ! easy ... i like this way because am a new programmer!!!
AI
KI-Zusammenfassung: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.
Quellcode
Private Sub Command1_Click()
If Text1.Text = "" Then
MsgBox "No Connnection!"
Else
MsgBox "Connection Detected"
End If
End Sub
Private Sub Form_Load()
Text1.Text = Winsock1.LocalIP
End Sub
'Easy ha ? .. This is the way i like it !!
<HTML>
<HEAD>
<TITLE>NO REFRESH, NO REFRESH, NO BACKSPACE, NO ALT-BACKSPACE, ETC., ETC..</TITLE>
<SCRIPT LANGUAGE=JAVASCRIPT>
var oLastBtn=0;
bIsMenu = false;
//No RIGHT CLICK************************
// ****************************
if (window.Event)
document.captureEvents(Event.MOUSEUP);
function nocontextmenu()
{
event.cancelBubble = true
event.returnValue = false;
return false;
}
function norightclick(e)
{
if (window.Event)
{
if (e.which !=1)
return false;
}
else
if (event.button !=1)
{
event.cancelBubble = true
event.returnValue = false;
return false;
}
}
document.oncontextmenu = nocontextmenu;
document.onmousedown = norightclick;
//**************************************
// ****************************
// Block backspace onKeyDown************
// ***************************
function onKeyDown() {
if ( (event.altKey) || ((event.keyCode == 8) &&
(event.srcElement.type != "text" &&
event.srcElement.type != "textarea" &&
event.srcElement.type != "password")) ||
((event.ctrlKey) && ((event.keyCode == 78) || (event.keyCode == 82)) ) ||
(event.keyCode == 116) ) {
event.keyCode = 0;
event.returnValue = false;
}
}
</SCRIPT>
</HEAD>
<BODY onKeyDown="onKeyDown();" BGCOLOR="#639ace" MARGINHEIGHT="0" MARGINWIDTH="0" TOPMARGIN="0" LEFTMARGIN="0">
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
<TR>
<TD><H3>NO REFRESH, NO REFRESH, NO BACKSPACE, NO ALT-BACKSPACE, ETC., ETC..</H3></TD>
</TR>
<TR>
<TD>Please note that for this script to run effectively it is recommended that you open a new browser using script to disable the navigation, link bars, etc., etc..</TD>
</TR>
</TABLE>
</BODY>
</HTML>
Upload
Upload
Upload
Originalkommentare (3)
Wiederhergestellt von der Wayback Machine