大概用什么技术?给一点技术上的提示也好啊?

解决方案 »

  1.   

    从他的title里得到什么网页,如果不希望他访问,就用程序关闭这个窗口,如果你还想进一步的阻止它,就用API让他关机,更简单的关机方法是:shell shutdown -s 如果还要其它请shutdown /?
      

  2.   

    谢谢你的回复, 具体如何得到当前ie的title,能提示一下吗? 是不是该先获取到当前他打开的浏览器窗口对象?  该怎么获取啊?  另外如果他不用ie,用腾讯之类的也行吗?? 还请上面的老兄及各位高手多多提示啊。多谢了。
      

  3.   

    我现在知道有一个用一个api可以获取到打开窗口的对象,可是获取标题好象不能准确对应一个网站吧?标题如果改了或者是动态的怎么办呢? 还是获取url好一些。 关于这个有什么好的其他办法吗?高手指点啊。
      

  4.   

    微软件是这样说的。
    Use this property with the Set and CreateObject commands or with the GetObject command to create and manipulate an instance of the Microsoft® Internet Explorer application as shown in the following early binding example. Dim IE As SHDocVw.InternetExplorerSet IE = CreateObject("InternetExplorer.Application")用CreateObject可以创建,但当我用GetObject的时候怎么都得不到它的对象,微软真是个骗子
      

  5.   


    这是我朋友编的一段代码,用于关闭IE,可以对IE的标题内容进行判断,希望能帮上忙!还请指教!Private Declare Function GetForegroundWindow Lib "User32" () As LongPrivate Declare Function GetWindowText Lib "User32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As LongPrivate Declare Function FindWindow Lib "User32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
    Private Declare Function PostMessage Lib "User32" Alias "PostMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
    Private Const WM_QUIT = &H12
    Private Const WM_CLOSE = &H10private sub findieandclose()
    Dim IEhwnd As Long
    Dim IETitle As String
    Dim szText As String * 100
    Dim R As Integer
    dim flag as long
    IEhwnd = GetForegroundWindow  '获得前台窗口的句柄。这里的“前台窗口”是指前台应用程序的活动窗口 
    R = GetWindowText(IEhwnd, szText, 100)
    IETitle = Left(szText, R)
    weizhi = InStr(1, IETitle, " - Microsoft Internet Explorer")
    if weizhi="某某网站的标题" then
    Dim Flag As Long
    Flag = FindWindow(vbNullString, WindowName)
    If Flag <> 0 Then
       Call PostMessage(Flag, WM_CLOSE, 0, 0)
    End Ifendif
      

  6.   

    '引用Microsoft Internet Controls
    Private Sub Command1_Click()
    Dim IEwin As ShellWindows
    Dim IE As InternetExplorer
    Set IEwin = New ShellWindows
    For Each IE In IEwin
      msgbox IE.localurl
    Next
    End Sub/////使用户该网站访问不了
    改C:\WINDOWS\system32\drivers\etc\hosts文件就可以.最后面加上如下一句
    community.csdn.net 127.0.0.1