home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / inform1a / infosear.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1998-09-11  |  11.0 KB  |  358 lines

  1. VERSION 5.00
  2. Object = "{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}#1.1#0"; "SHDOCVW.DLL"
  3. Begin VB.Form Form1 
  4.    Caption         =   "Information Browser - v1.0"
  5.    ClientHeight    =   7425
  6.    ClientLeft      =   60
  7.    ClientTop       =   630
  8.    ClientWidth     =   10620
  9.    LinkTopic       =   "Form1"
  10.    MaxButton       =   0   'False
  11.    ScaleHeight     =   495
  12.    ScaleMode       =   3  'Pixel
  13.    ScaleWidth      =   708
  14.    StartUpPosition =   2  'CenterScreen
  15.    Begin VB.PictureBox go_forward 
  16.       BorderStyle     =   0  'None
  17.       Height          =   225
  18.       Left            =   3720
  19.       Picture         =   "InfoSearch.frx":0000
  20.       ScaleHeight     =   225
  21.       ScaleWidth      =   615
  22.       TabIndex        =   10
  23.       Top             =   120
  24.       Width           =   615
  25.    End
  26.    Begin VB.PictureBox go_back 
  27.       BorderStyle     =   0  'None
  28.       Height          =   225
  29.       Left            =   3360
  30.       Picture         =   "InfoSearch.frx":03A8
  31.       ScaleHeight     =   225
  32.       ScaleWidth      =   255
  33.       TabIndex        =   9
  34.       Top             =   120
  35.       Width           =   255
  36.    End
  37.    Begin VB.PictureBox Picture3 
  38.       BorderStyle     =   0  'None
  39.       Height          =   225
  40.       Left            =   4440
  41.       Picture         =   "InfoSearch.frx":074D
  42.       ScaleHeight     =   225
  43.       ScaleWidth      =   615
  44.       TabIndex        =   8
  45.       Top             =   120
  46.       Width           =   615
  47.    End
  48.    Begin VB.PictureBox Picture2 
  49.       BorderStyle     =   0  'None
  50.       Height          =   225
  51.       Left            =   5160
  52.       Picture         =   "InfoSearch.frx":0B70
  53.       ScaleHeight     =   225
  54.       ScaleWidth      =   615
  55.       TabIndex        =   7
  56.       Top             =   120
  57.       Width           =   615
  58.    End
  59.    Begin VB.PictureBox Picture1 
  60.       BorderStyle     =   0  'None
  61.       Height          =   225
  62.       Left            =   5880
  63.       Picture         =   "InfoSearch.frx":0FA0
  64.       ScaleHeight     =   225
  65.       ScaleWidth      =   615
  66.       TabIndex        =   6
  67.       Top             =   120
  68.       Width           =   615
  69.    End
  70.    Begin VB.ListBox previous_searches 
  71.       Height          =   1620
  72.       Left            =   7680
  73.       TabIndex        =   4
  74.       Top             =   240
  75.       Width           =   2895
  76.    End
  77.    Begin VB.TextBox search_url 
  78.       Height          =   285
  79.       Left            =   120
  80.       TabIndex        =   3
  81.       Top             =   720
  82.       Visible         =   0   'False
  83.       Width           =   3495
  84.    End
  85.    Begin SHDocVwCtl.WebBrowser search_results 
  86.       Height          =   5175
  87.       Left            =   0
  88.       TabIndex        =   2
  89.       Top             =   2160
  90.       Width           =   10650
  91.       ExtentX         =   18785
  92.       ExtentY         =   9128
  93.       ViewMode        =   1
  94.       Offline         =   0
  95.       Silent          =   0
  96.       RegisterAsBrowser=   0
  97.       RegisterAsDropTarget=   1
  98.       AutoArrange     =   -1  'True
  99.       NoClientEdge    =   0   'False
  100.       AlignLeft       =   0   'False
  101.       ViewID          =   "{0057D0E0-3573-11CF-AE69-08002B2E1262}"
  102.       Location        =   ""
  103.    End
  104.    Begin VB.TextBox search_string 
  105.       Height          =   285
  106.       Left            =   120
  107.       TabIndex        =   1
  108.       Top             =   360
  109.       Width           =   6420
  110.    End
  111.    Begin VB.ComboBox search_engine 
  112.       Height          =   315
  113.       Left            =   120
  114.       TabIndex        =   0
  115.       Top             =   0
  116.       Width           =   3135
  117.    End
  118.    Begin VB.Label Label1 
  119.       Caption         =   "Previous Searches"
  120.       BeginProperty Font 
  121.          Name            =   "MS Sans Serif"
  122.          Size            =   8.25
  123.          Charset         =   0
  124.          Weight          =   700
  125.          Underline       =   0   'False
  126.          Italic          =   0   'False
  127.          Strikethrough   =   0   'False
  128.       EndProperty
  129.       Height          =   255
  130.       Left            =   7680
  131.       TabIndex        =   5
  132.       Top             =   0
  133.       Width           =   2895
  134.    End
  135.    Begin VB.Menu mnu_file 
  136.       Caption         =   "&File"
  137.       Begin VB.Menu mnu_file_open 
  138.          Caption         =   "&Open"
  139.       End
  140.       Begin VB.Menu mnu_file_seperator 
  141.          Caption         =   "-"
  142.       End
  143.       Begin VB.Menu mnu_file_exit 
  144.          Caption         =   "E&xit"
  145.       End
  146.    End
  147.    Begin VB.Menu mnu_web 
  148.       Caption         =   "On The &Web"
  149.       Begin VB.Menu mnu_web_riot_home 
  150.          Caption         =   "&Information Riot Website"
  151.       End
  152.    End
  153.    Begin VB.Menu mnu_help 
  154.       Caption         =   "&Help"
  155.       Begin VB.Menu mnu_help_search 
  156.          Caption         =   "&Search Help"
  157.       End
  158.       Begin VB.Menu mnu_help_seperator 
  159.          Caption         =   "-"
  160.       End
  161.       Begin VB.Menu mnu_help_about 
  162.          Caption         =   "&About"
  163.       End
  164.    End
  165. Attribute VB_Name = "Form1"
  166. Attribute VB_GlobalNameSpace = False
  167. Attribute VB_Creatable = False
  168. Attribute VB_PredeclaredId = True
  169. Attribute VB_Exposed = False
  170. Private Sub ads_revolve_Timer()
  171. ad_bar.Refresh
  172. End Sub
  173. Private Sub Check1_Click()
  174. search_engine.Enabled = True
  175. search_url.Text = ""
  176. End Sub
  177. Private Sub Form_Load()
  178. On Error Resume Next
  179. search_engine.AddItem "Yahoo!"
  180. search_engine.AddItem "Yahoo! Stock Quotes(Symbol Lookup)"
  181. search_engine.AddItem "Altavista"
  182. search_engine.AddItem "Lycos"
  183. search_engine.AddItem "Lycos MP3 Search"
  184. search_engine.AddItem "Dogpile"
  185. search_engine.AddItem "Infoseek"
  186. search_engine.AddItem "Excite"
  187. search_engine.AddItem "HotBot"
  188. search_engine.AddItem "Deja"
  189. search_engine.AddItem "ICQ iT!"
  190. search_engine.AddItem "Thunderstone"
  191. search_engine.AddItem "Scrub The Web"
  192. search_engine.ListIndex = 0
  193. search_string.Text = ""
  194. End Sub
  195. Private Sub Label2_Click()
  196. On Error Resume Next
  197. search_results.Stop
  198. End Sub
  199. Private Sub go_back_Click()
  200. On Error Resume Next
  201. search_results.GoBack
  202. End Sub
  203. Private Sub go_forward_Click()
  204. On Error Resume Next
  205. search_results.GoForward
  206. End Sub
  207. Private Sub mnu_file_exit_Click()
  208. On Error Resume Next
  209. Unload Me
  210. End Sub
  211. Private Sub mnu_file_open_Click()
  212. On Error Resume Next
  213. form_open.Show
  214. End Sub
  215. Private Sub mnu_help_about_Click()
  216. On Error Resume Next
  217. frmAbout.Show
  218. End Sub
  219. Private Sub mnu_web_riot_home_Click()
  220. On Error Resume Next
  221. search_results.Navigate ("http://www.inforiot.com")
  222. End Sub
  223. Private Sub Picture1_Click()
  224. On Error Resume Next
  225. Dim strURL As String
  226. strURL = search_string.Text
  227. Dim bFound As Boolean
  228. On Error Resume Next
  229. 'check to make sure the url is valid
  230. If search_engine.Text = "Yahoo!" Then
  231. search_url.Text = "http://search.yahoo.com/bin/search?p="
  232. If search_engine.Text = "Yahoo! Stock Quotes(Symbol Lookup)" Then
  233. search_url.Text = "http://finance.yahoo.com/l?s="
  234. If search_engine.Text = "Altavista" Then
  235. search_url.Text = "http://www.altavista.com/cgi-bin/query?pg=q&kl=XX&stype=stext&q="
  236. If search_engine.Text = "Lycos" Then
  237. search_url.Text = "http://www.lycos.com/cgi-bin/pursuit?cat=dir&query="
  238. If search_engine.Text = "Dogpile" Then
  239. search_url.Text = "http://www.dogpile.com/texis/search?q="
  240. If search_engine.Text = "Infoseek" Then
  241. search_url.Text = "http://infoseek.go.com/Titles?qt="
  242. If search_engine.Text = "Excite" Then
  243. search_url.Text = "http://search.excite.com/search.gw?search="
  244. If search_engine.Text = "HotBot" Then
  245. search_url.Text = "http://www.hotbot.com/?MT="
  246. If search_engine.Text = "Deja" Then
  247. search_url.Text = "http://www.deja.com/qs.xp?OP=dnquery.xp&ST=QS&QRY="
  248. If search_engine.Text = "ICQ iT!" Then
  249. search_url.Text = "http://www.icqit.com/default.asp?MT="
  250. If search_engine.Text = "Thunderstone" Then
  251. search_url.Text = "http://search.thunderstone.com/texis/websearch/?q="
  252. If search_engine.Text = "Scrub The Web" Then
  253. search_url.Text = "http://www.scrubtheweb.com/cgi-bin/search.cgi?keyword="
  254. If search_engine.Text = "Lycos MP3 Search" Then
  255. search_url.Text = "http://mp3.lycos.com/cgi-bin/search?form=lycosnet&query="
  256. End If
  257. End If
  258. End If
  259. End If
  260. End If
  261. End If
  262. End If
  263. End If
  264. End If
  265. End If
  266. End If
  267. End If
  268. End If
  269. 'end check
  270. 'check to see if user has entered anything to search for
  271. On Error Resume Next
  272. If search_string.Text = "" Then GoTo failed Else: GoTo passed
  273. 'end check
  274. failed:
  275. MsgBox ("OOPS! You Forgot To Type In What You Whould Like To Search For!")
  276. Exit Sub
  277. passed:
  278. For i = 0 To previous_searches.ListCount - 1
  279. If previous_searches.List(i) = strURL Then
  280. bFound = True
  281. Exit For
  282. End If
  283. Next i
  284. If Not bFound Then
  285. previous_searches.AddItem strURL
  286. End If
  287. search_url.Text = search_url.Text + search_string.Text
  288. search_results.Navigate (search_url.Text)
  289. search_string.Text = ""
  290. End Sub
  291. Private Sub Picture2_Click()
  292. On Error Resume Next
  293. search_results.Stop
  294. End Sub
  295. Private Sub Picture3_Click()
  296. On Error Resume Next
  297. search_results.Refresh
  298. End Sub
  299. Private Sub previous_searches_Click()
  300.  On Error Resume Next
  301.  search_string.Text = previous_searches.Text
  302. End Sub
  303. Private Sub search_engine_Click()
  304. On Error Resume Next
  305. If search_engine.Text = "Yahoo!" Then
  306. search_url.Text = "http://search.yahoo.com/bin/search?p="
  307. If search_engine.Text = "Yahoo! Stock Quotes(Symbol Lookup)" Then
  308. search_url.Text = "http://finance.yahoo.com/l?s="
  309. If search_engine.Text = "Altavista" Then
  310. search_url.Text = "http://www.altavista.com/cgi-bin/query?pg=q&kl=XX&stype=stext&q="
  311. If search_engine.Text = "Lycos" Then
  312. search_url.Text = "http://www.lycos.com/cgi-bin/pursuit?cat=dir&query="
  313. If search_engine.Text = "Dogpile" Then
  314. search_url.Text = "http://www.dogpile.com/texis/search?q="
  315. If search_engine.Text = "Infoseek" Then
  316. search_url.Text = "http://infoseek.go.com/Titles?qt="
  317. If search_engine.Text = "Excite" Then
  318. search_url.Text = "http://search.excite.com/search.gw?search="
  319. If search_engine.Text = "HotBot" Then
  320. search_url.Text = "http://www.hotbot.com/?MT="
  321. If search_engine.Text = "ICQ iT!" Then
  322. search_url.Text = "http://www.icqit.com/default.asp?MT="
  323. If search_engine.Text = "Thunderstone" Then
  324. search_url.Text = "http://search.thunderstone.com/texis/websearch/?q="
  325. If search_engine.Text = "Scrub The Web" Then
  326. search_url.Text = "http://www.scrubtheweb.com/cgi-bin/search.cgi?keyword="
  327. If search_engine.Text = "Lycos MP" Then
  328. search_url.Text = "http://mp3.lycos.com/cgi-bin/search?form=lycosnet&query="
  329. End If
  330. End If
  331. End If
  332. End If
  333. End If
  334. End If
  335. End If
  336. End If
  337. End If
  338. End If
  339. End If
  340. End If
  341. End Sub
  342. Private Sub search_results_TitleChange(ByVal Text As String)
  343. On Error Resume Next
  344. Form1.Caption = ""
  345. Form1.Caption = "Information Browser v1.0" + " -- " + search_results.LocationName
  346. End Sub
  347. Private Sub search_string_KeyPress(KeyAscii As Integer)
  348. On Error Resume Next
  349. If KeyAscii = 32 Then
  350. search_string.SetFocus
  351. SendKeys "{bs}"
  352. SendKeys "{+}"
  353. If KeyAscii = 13 Then
  354. Picture1_Click
  355. End If
  356. End If
  357. End Sub
  358.