MIB's original question asked for a simple way to get started on a blocker. It seemed, simple to use some ordinary API functions;<br>
RasEnumConnections and RasGetConnectStatus to check the internet connection. EnumWindows, GetClassName, SendMessage and GetWindowsText to retrieve the URL. ShellExecute to return to the previous URL if the current one does not appear on a list of approved sites.<br>
<br>
MIB could even check for "naughty" words on a page. This actually works, 'though I wouldn't recommend it because it's such a cheap and inefficient way of finding words on a page (Mike and ChipH will undoubtedly point out 39 <b>good</b> ways to copy the focus window to the clipboard).<br>
<br>
OldClbd$=Clipboard.GetText 'save the contents of the clipboard<br>
SendKeys "^a", True 'select all on the page with focus<br>
SendKeys "^c", True 'put the text on the clipboard<br>
SendKeys "{TAB}" 'deselect all<br>
Clbd$=UCase$(Clipboard.GetText) 'put the upper case clipboard in a string<br>
For Rep = 1 to UBound(NaughtyWordList)<br>
'check for naughty words<br>
If InStr(Clbd$, NaughtyWordList(Rep)) Then<br>
MsgBox "Page contains naughty words"<br>
End If<br>
Next<br>
Clipboard.SetText OldClbd$ 'restore the old clipboard contents<br>
<br>
It just didn't seem necessary to use an OCX and, frankly, you guys are talking about things that are a little over my head. I'm sorry I opened my mouth.<br>
With that, I respectfully bow out of this discussion.<br>
<p> <br><a href=mailto: > </a><br><a href=
Vorpalcom home page</a><br>Send me suggestions or comments on my current software project.