form1::::::::::::::::
Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Private Const HWND_TOPMOST& = -1
Private Const SWP_NOSIZE& = &H1
Private Const SWP_NOMOVE& = &H2
Private Sub Command1_Click()
Call chaxun
End Sub
Private Sub Command2_Click()
Dim s As String
If Text1.Text = "" Then
MsgBox "怎么什么也不写,那怎么搜索啊", vbOKCancel, "警告"
Text1.Text = "输入要搜索的关键字"
End If
s = Form1.Text1.Text
Form2.WebBrowser1.Navigate "http://www.baidu.com/s?wd=" + s
Form2.Show
End Sub
Private Sub Command3_Click()
End
End Sub
Private Sub Command4_Click()
Unload Form1
Unload Form2
Form3.Show
End Sub
Private Sub Form_Load()
Label1.ForeColor = vbBlue
SetWindowPos Me.hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE
End Sub
Private Sub Text1_GotFocus()
Text1.Text = ""
Text2.Text = ""
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Call chaxun
End If
End Sub
Private Sub Timer1_Timer()
If Label1.ForeColor = vbBlue Then
Label1.ForeColor = vbGreen
Else
Label1.ForeColor = vbBlue
End If
End Sub
Private Sub chaxun()
Dim a As String, b As String, c As Integer, d As Integer, i As Integer
If Text1.Text = "" Then
MsgBox "怎么什么也不写,那怎么搜索啊", vbOKCancel, "警告"
Text1.Text = "输入要搜索的关键字"
End If
a = Text1.Text
c = Len(a)
Open "answer.dat" For Input As #1
Do While Not EOF(1)
Line Input #1, b
d = Len(b)
For i = 1 To (d - c + 1)
If Mid(b, i, c) = a Then
Text2.Text = Text2.Text + b & vbCrLf
End If
Next i
Loop
Close #1
End Sub
Open "answer.txt" For Input As #1
Do While Not EOF(1)
Line Input #1, b
d = Len(b)
For i = 1 To (d - c + 1)
If Mid(b, i, c) = a Then
Text2.Text = Text2.Text + b & vbCrLf
End If
Next i
Loop
Close #1
End Sub
form3:::::::::::::::::::
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Const SW_SHOWNORMAL = 1
Private Const SW_SHOWMINIMIZED = 2
Private Sub Command1_Click()
End
End Sub
Private Sub Label3_Click()
Call ShellExecute(Me.hwnd, "open", "http://l.thec.cn/dtzx/dtdtq.rar", vbNullString, vbNullString, SW_SHOWNORMAL)
End Sub
答题器(适用于各种游戏)
4星 · 超过85%的资源 需积分: 50 33 浏览量
2008-12-25
11:55:16
上传
评论 13
收藏 170KB RAR 举报
ownsky365
- 粉丝: 0
- 资源: 5
最新资源
- Blazor 下的 Json 编辑器
- q6.zip
- 【消息队列 】面试题.pdf
- Dell EMC Unity-Misc Procedures- Service Commands-3.pdf
- MiniSMB-HurricaneII
- 软专2302赵炳坤2301990241.ste
- 缓存面试题大全 pdf版
- SC Series-SC5020 Replacement- Battery Backup Unit-1.pdf
- SC Series-SC5020 Replacement-Choose an Option- Hard Drives-1.pdf
- 洛雪音源示例模板lx-music-source-example
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈