home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Planet Source Code Jumbo …e CD Visual Basic 1 to 7
/
3_2004-2005.ISO
/
Data
/
Zips
/
IMDB_Movie1840511162005.psc
/
frmSearch.frm
< prev
Wrap
Text File
|
2005-01-16
|
9KB
|
280 lines
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Object = "{248DD890-BB45-11CF-9ABC-0080C7E7B78D}#1.0#0"; "MSWINSCK.OCX"
Begin VB.Form frmSearch
Caption = "Search Movies"
ClientHeight = 6240
ClientLeft = 3090
ClientTop = 2250
ClientWidth = 6480
BeginProperty Font
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Icon = "frmSearch.frx":0000
LinkTopic = "Form1"
ScaleHeight = 416
ScaleMode = 3 'Pixel
ScaleWidth = 432
Begin MSComctlLib.ImageList imgs
Left = 2460
Top = 1200
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 16
ImageHeight = 16
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 2
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmSearch.frx":000C
Key = ""
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmSearch.frx":035E
Key = ""
EndProperty
EndProperty
End
Begin MSComctlLib.Toolbar tb
Align = 1 'Align Top
Height = 570
Left = 0
TabIndex = 7
Top = 0
Width = 6480
_ExtentX = 11430
_ExtentY = 1005
ButtonWidth = 1799
ButtonHeight = 953
Appearance = 1
Style = 1
ImageList = "imgs"
_Version = 393216
BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
NumButtons = 1
BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "Get Checked"
Object.ToolTipText = "Download Selected Movie Information"
ImageIndex = 2
EndProperty
EndProperty
End
Begin VB.TextBox Text2
Height = 315
Left = 4260
MaxLength = 3
TabIndex = 6
Text = "20"
ToolTipText = "Maximum Movies to Display"
Top = 300
Width = 975
End
Begin VB.CommandButton Command1
Caption = "Search"
Default = -1 'True
Height = 315
Left = 5340
TabIndex = 4
Top = 300
Width = 1035
End
Begin VB.TextBox Text1
Height = 315
Left = 60
TabIndex = 2
ToolTipText = "Enter movie name or terms to search for"
Top = 300
Width = 4095
End
Begin MSComctlLib.StatusBar sb
Align = 2 'Align Bottom
Height = 270
Left = 0
TabIndex = 1
Top = 5970
Width = 6480
_ExtentX = 11430
_ExtentY = 476
_Version = 393216
BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628}
NumPanels = 1
BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628}
AutoSize = 2
EndProperty
EndProperty
End
Begin MSComctlLib.ListView lstResults
Height = 4575
Left = 60
TabIndex = 0
Top = 1320
Width = 6375
_ExtentX = 11245
_ExtentY = 8070
View = 3
LabelEdit = 1
LabelWrap = -1 'True
HideSelection = -1 'True
Checkboxes = -1 'True
FullRowSelect = -1 'True
GridLines = -1 'True
_Version = 393217
Icons = "imgs"
SmallIcons = "imgs"
ForeColor = -2147483640
BackColor = -2147483643
BorderStyle = 1
Appearance = 1
NumItems = 3
BeginProperty ColumnHeader(1) {BDD1F052-858B-11D1-B16A-00C0F0283628}
Text = "Movie Title"
Object.Width = 3528
EndProperty
BeginProperty ColumnHeader(2) {BDD1F052-858B-11D1-B16A-00C0F0283628}
SubItemIndex = 1
Text = "Date"
Object.Width = 1323
EndProperty
BeginProperty ColumnHeader(3) {BDD1F052-858B-11D1-B16A-00C0F0283628}
SubItemIndex = 2
Text = "IMDB ID"
Object.Width = 2540
EndProperty
End
Begin MSWinsockLib.Winsock sckSearch
Left = 300
Top = 540
_ExtentX = 741
_ExtentY = 741
_Version = 393216
End
Begin MSComctlLib.Toolbar Toolbar1
Align = 1 'Align Top
Height = 630
Left = 0
TabIndex = 8
Top = 570
Width = 6480
_ExtentX = 11430
_ExtentY = 1111
ButtonWidth = 609
ButtonHeight = 953
Appearance = 1
_Version = 393216
End
Begin VB.Label Label2
Caption = "Max Results:"
Height = 255
Left = 4260
TabIndex = 5
Top = 60
Width = 1035
End
Begin VB.Label Label1
Caption = "Search Text:"
Height = 195
Left = 60
TabIndex = 3
Top = 60
Width = 5175
End
End
Attribute VB_Name = "frmSearch"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public HTML_RES As String
Private Sub Command1_Click()
Searchit
End Sub
Public Sub Searchit()
Dim HEADER As String
Dim SearchQuery As String
If sckSearch.State <> sckClosed Then sckSearch.Close
sckSearch.Connect "www.imdb.com", 80
disablecommands False
Do
DoEvents
Select Case sckSearch.State
Case sckConnected, sckConnecting, sckResolvingHost, sckHostResolved, sckConnectionPending
Case Else
If sckSearch.State <> sckClosed Then sckSearch.Close
MsgBox "Error while connecting to Internet movie database!", vbCritical, "Connection Error"
disablecommands True
Exit Sub
End Select
Loop Until sckSearch.State = sckConnected
'connected, request search
'find?tt=on;mx=20;q=last
'form the search query, and replace any
'spaces in the query with %20's, which
'are code for HTML spaces
'new version for new imdb search query
'SearchQuery = "/find?tt=on;mx=" & Text2.Text & ";q=" & formatHTML(Text1.Text)
'http://imdb.com/find?q=matrix;tt=on;nm=on;mx=20
SearchQuery = "/find?q=" & formatHTML(Text1.Text) & ";tt=on;nm=on;mx=" & Text2.Text
'q = Query
'tt = IMDB CODE!! yommrset Vo)rset Vo)rs2;q=" & for = -2147483640
tottttt{d = True
Attribute VB_Exposed = False
Public HTML_RES As String
Priva/nlc.0tch
'a/nd replace any
'spaS
Priva/nlc.ce any
'spMit_GlospM*1-B16Ation -2147483640
tottttt{dM*1-B16Privo)med, r1
s7q=last
d, r1
s7q=last
d, r1
s7q=last0cn;nm= r(2) {BDD1F052-858B-11D1-B16A-00C0F20Dn sci2140 _ExtenIp2 =>d, >1430
_ExtentLtedH430
eO0cnz= /NumIwfrs
rr
xBs StriNumItems xten= 4260,s58B-11D1-B16A = 6480
4mB-11D0 = 3
onnectim4) {mMl
s7q=last0cn16bolast0WBegin MSW.LefaM sci2140 _ExtenIp2 =>s-B-1'SearchQue"u = IMDB Ged Be2.Text
'q = Query
'tt = IMDB CODE!! yommrset Vo)rset Vo)rs2;q=" Query
2 =>s-B-
SearchQuen Ot5O52-8blast0cn;nm= st t = IMllllllllllliBdM*1-B16Privo)me=?q=Alll tottt1eeo0,s58B-11D1 tottt1eeo0c8MSW.L'16Privo)me=?q=Alll toteryTeeo0c8Mb totWfmL(Text1.Telected MovByf"4748364et = P7II/>8 TiL'16Privo)me=?q=Aly
mt search qPrivo)me=?q=Aly
mt search qPrivo)me=?q=Aly
mt search ry
D2140 _ExtenIp2 no0c8 Fmivo)m =2t1 1035
En-iotmt seatew v;m-B16Pg6ctionPending
Case Else
If sb 1035
En-iotmt seatew v;m-B16Pg6ctibgin MSWinsa