⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 form1.frm

📁 enumera windows
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "Teste"
   ClientHeight    =   735
   ClientLeft      =   45
   ClientTop       =   345
   ClientWidth     =   3015
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   49
   ScaleMode       =   3  'Pixel
   ScaleWidth      =   201
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  'CenterScreen
   Visible         =   0   'False
   Begin VB.CommandButton Command1 
      Caption         =   "Fechar"
      Height          =   495
      Left            =   960
      TabIndex        =   1
      Top             =   120
      Width           =   1215
   End
   Begin VB.Timer Timer1 
      Interval        =   200
      Left            =   1680
      Top             =   1320
   End
   Begin VB.ListBox List1 
      Height          =   2010
      Left            =   840
      TabIndex        =   0
      Top             =   840
      Visible         =   0   'False
      Width           =   3255
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Declare Function EnumWindows Lib "user32" (ByVal lpEnumFunc As Long, ByVal lParam As Long) As Long
Dim B As Boolean, J As Integer, JJ As Boolean, SelX As Integer
Dim Sites As Collection
Private Sub Command1_Click()
End
End Sub

Private Sub Form_Load()
EnumWindows AddressOf EnumWin, 0&
Timer1.Enabled = True
Set Sites = New Collection
Sites.Add "orkut - login - Mozilla Firefox" 'posi玢o 1
Sites.Add "Pesquisa de imagens do Google - Mozilla Firefox" 'posi玢o 2
Sites.Add "Yahoo! Brasil - Mozilla Firefox" 'posi玢o 3

End Sub

Private Sub Timer1_Timer()
List1.Clear
Set hwnds = New Collection
EnumWindows AddressOf EnumWin, 0&

For x = 1 To Sites.Count
For i = 0 To List1.ListCount - 1
If InStr(1, List1.List(i), Sites.Item(x), vbTextCompare) And B = False Then
B = True
SelX = x

If x = 1 Then Form2.Show ' se for o item na posi玢o 1, exibe o form2
If x = 2 Then MsgBox "Pesquisa de imagens do google" 'se for o item na posi玢o 2, exibe a msg
If x = 3 Then MsgBox "Yahoo Brasil" 'se for o item na posi玢o 2, exibe a msg


Set hwnds = New Collection
EnumWindows AddressOf EnumWin, 0&
End If
Next
Next

DoEvents

If B = True Then
JJ = False
For J = 0 To List1.ListCount - 1
If InStr(1, List1.List(J), Sites(SelX)) Then JJ = True
Next
If JJ = False Then B = False Else B = True 'se tiver o orkut ainda...
End If
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -