home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programming Tool Box
/
SIMS_2.iso
/
vb_code1
/
address
/
search.frm
< prev
next >
Wrap
Text File
|
1993-07-05
|
11KB
|
361 lines
VERSION 2.00
Begin Form Search
BackColor = &H00C0C0C0&
BorderStyle = 3 'Fixed Double
Caption = "Mike's Address Search"
ClientHeight = 2265
ClientLeft = 2310
ClientTop = 3030
ClientWidth = 4035
Height = 2955
Left = 2250
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2265
ScaleWidth = 4035
Top = 2400
Width = 4155
Begin SSCommand Command3D2
BevelWidth = 3
Caption = "&Cancel"
Font3D = 3 'Inset w/light shading
FontBold = -1 'True
FontItalic = 0 'False
FontName = "Arial"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 375
Left = 3000
TabIndex = 13
Top = 1320
Width = 855
End
Begin SSCommand Command3D1
BevelWidth = 3
Caption = "&Ok"
Font3D = 3 'Inset w/light shading
FontBold = -1 'True
FontItalic = 0 'False
FontName = "Arial"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 375
Left = 3000
TabIndex = 12
Top = 840
Width = 855
End
Begin SSFrame Frame3D1
Caption = "Search :"
Font3D = 3 'Inset w/light shading
FontBold = -1 'True
FontItalic = 0 'False
FontName = "Arial"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 1455
Left = 120
ShadowColor = 1 'Black
ShadowStyle = 1 'Raised
TabIndex = 2
Top = 720
Width = 2655
Begin SSCheck Check3D9
Caption = "Phone"
Font3D = 3 'Inset w/light shading
FontBold = -1 'True
FontItalic = 0 'False
FontName = "Arial"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 195
Left = 1320
TabIndex = 11
Top = 960
Value = -1 'True
Width = 1215
End
Begin SSCheck Check3D8
Caption = "Information"
Font3D = 3 'Inset w/light shading
FontBold = -1 'True
FontItalic = 0 'False
FontName = "Arial"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 195
Left = 1320
TabIndex = 10
Top = 720
Value = -1 'True
Width = 1215
End
Begin SSCheck Check3D7
Caption = "Message"
Font3D = 3 'Inset w/light shading
FontBold = -1 'True
FontItalic = 0 'False
FontName = "Arial"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 195
Left = 1320
TabIndex = 9
Top = 480
Value = -1 'True
Width = 1215
End
Begin SSCheck Check3D6
Caption = "Country"
Font3D = 3 'Inset w/light shading
FontBold = -1 'True
FontItalic = 0 'False
FontName = "Arial"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 195
Left = 1320
TabIndex = 8
Top = 240
Value = -1 'True
Width = 1215
End
Begin SSCheck Check3D5
Caption = "Zip Code"
Font3D = 3 'Inset w/light shading
FontBold = -1 'True
FontItalic = 0 'False
FontName = "Arial"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 195
Left = 120
TabIndex = 7
Top = 1200
Value = -1 'True
Width = 1095
End
Begin SSCheck Check3D4
Caption = "State"
Font3D = 3 'Inset w/light shading
FontBold = -1 'True
FontItalic = 0 'False
FontName = "Arial"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 195
Left = 120
TabIndex = 6
Top = 960
Value = -1 'True
Width = 1095
End
Begin SSCheck Check3D3
Caption = "City"
Font3D = 3 'Inset w/light shading
FontBold = -1 'True
FontItalic = 0 'False
FontName = "Arial"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 195
Left = 120
TabIndex = 5
Top = 720
Value = -1 'True
Width = 1095
End
Begin SSCheck Check3D2
Caption = "Street"
Font3D = 3 'Inset w/light shading
FontBold = -1 'True
FontItalic = 0 'False
FontName = "Arial"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 195
Left = 120
TabIndex = 4
Top = 480
Value = -1 'True
Width = 1095
End
Begin SSCheck Check3D1
Caption = "Name"
Font3D = 3 'Inset w/light shading
FontBold = -1 'True
FontItalic = 0 'False
FontName = "Arial"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 195
Left = 120
TabIndex = 3
Top = 240
Value = -1 'True
Width = 1095
End
End
Begin TextBox Text1
FontBold = -1 'True
FontItalic = 0 'False
FontName = "Arial"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 315
Left = 120
MaxLength = 35
TabIndex = 1
Top = 360
Width = 3855
End
Begin Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Enter Search String Below:"
FontBold = -1 'True
FontItalic = 0 'False
FontName = "Arial"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 210
Left = 120
TabIndex = 0
Top = 120
Width = 2190
End
Begin Menu MenuPaste
Caption = "&Paste"
End
End
Sub Command3D1_Click ()
'make sure one at least one check box checked
OneChecked% = False
If Check3D1.Value Or Check3D2.Value Or Check3D3.Value Or Check3D4.Value Then
OneChecked% = True
ElseIf Check3D5.Value Or Check3D6.Value Or Check3D7.Value Or Check3D8.Value Or Check3D9.Value Then
OneChecked% = True
End If
'make sure we have a text search string
If Trim$(Text1.Text) <> "" And OneChecked% = True Then
Search.Tag = "YES"
Else
Search.Tag = "NO"
End If
Search.Hide
End Sub
Sub Command3D2_Click ()
'setting form tag is easy way to pass info back and forth
'between forms
Search.Tag = ""
Search.Hide
End Sub
Sub Form_Load ()
INIFile$ = ThePath & "Address.ini"
Default$ = "NOCHECK"
TC$ = GetPPKeyString$("Checked", "HasCheck", Default$, INIFile$)
If TC$ <> "NOCHECK" Then
If InStr(TC$, "1") = 0 Then
Check3D1.Value = False
End If
If InStr(TC$, "2") = 0 Then
Check3D2.Value = False
End If
If InStr(TC$, "3") = 0 Then
Check3D3.Value = False
End If
If InStr(TC$, "4") = 0 Then
Check3D4.Value = False
End If
If InStr(TC$, "5") = 0 Then
Check3D5.Value = False
End If
If InStr(TC$, "6") = 0 Then
Check3D6.Value = False
End If
If InStr(TC$, "7") = 0 Then
Check3D7.Value = False
End If
If InStr(TC$, "8") = 0 Then
Check3D8.Value = False
End If
If InStr(TC$, "9") = 0 Then
Check3D9.Value = False
End If
End If
If Clipboard.GetFormat(1) Then
MenuPaste.Enabled = True
Else
MenuPaste.Enabled = False
End If
Search.Top = Address.Top + ((Address.Height - Search.Height) \ 3)
Search.Left = Address.Left + ((Address.Width - Search.Width) \ 2)
End Sub
Sub Form_Unload (Cancel As Integer)
TC$ = ""
If Check3D1.Value Then
TC$ = TC$ & "1"
End If
If Check3D2.Value Then
TC$ = TC$ & "2"
End If
If Check3D3.Value Then
TC$ = TC$ & "3"
End If
If Check3D4.Value Then
TC$ = TC$ & "4"
End If
If Check3D5.Value Then
TC$ = TC$ & "5"
End If
If Check3D6.Value Then
TC$ = TC$ & "6"
End If
If Check3D7.Value Then
TC$ = TC$ & "7"
End If
If Check3D8.Value Then
TC$ = TC$ & "8"
End If
If Check3D9.Value Then
TC$ = TC$ & "9"
End If
INIFile$ = ThePath & "address.ini"
x% = WritePPKeyString%("Checked", "HasCheck", TC$, INIFile$)
End Sub
Sub MenuPaste_Click ()
'allows user to copy info from address and just paste
If TypeOf Screen.ActiveControl Is TextBox Then
Screen.ActiveControl.SelText = Clipboard.GetText()
End If
End Sub
Sub Text1_KeyPress (KeyAscii As Integer)
'don't allow these characters. they mess up sqlq search
If KeyAscii = 91 Or KeyAscii = 93 Then
Beep 'stop [ and ] special to like
KeyAscii = 0
End If
End Sub