home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / VISUAL_B / CODIGO_1 / ADDRESS / SEARCH.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1993-07-06  |  11.1 KB  |  351 lines

  1. VERSION 2.00
  2. Begin Form Search 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   3  'Fixed Double
  5.    Caption         =   "Mike's Address Search"
  6.    ClientHeight    =   2265
  7.    ClientLeft      =   2310
  8.    ClientTop       =   3030
  9.    ClientWidth     =   4035
  10.    Height          =   2955
  11.    Left            =   2250
  12.    LinkTopic       =   "Form1"
  13.    MaxButton       =   0   'False
  14.    MinButton       =   0   'False
  15.    ScaleHeight     =   2265
  16.    ScaleWidth      =   4035
  17.    Top             =   2400
  18.    Width           =   4155
  19.    Begin SSCommand Command3D2 
  20.       BevelWidth      =   3
  21.       Caption         =   "&Cancel"
  22.       Font3D          =   3  'Inset w/light shading
  23.       FontBold        =   -1  'True
  24.       FontItalic      =   0   'False
  25.       FontName        =   "Arial"
  26.       FontSize        =   8.25
  27.       FontStrikethru  =   0   'False
  28.       FontUnderline   =   0   'False
  29.       Height          =   375
  30.       Left            =   3000
  31.       TabIndex        =   13
  32.       Top             =   1320
  33.       Width           =   855
  34.    End
  35.    Begin SSCommand Command3D1 
  36.       BevelWidth      =   3
  37.       Caption         =   "&Ok"
  38.       Font3D          =   3  'Inset w/light shading
  39.       FontBold        =   -1  'True
  40.       FontItalic      =   0   'False
  41.       FontName        =   "Arial"
  42.       FontSize        =   8.25
  43.       FontStrikethru  =   0   'False
  44.       FontUnderline   =   0   'False
  45.       Height          =   375
  46.       Left            =   3000
  47.       TabIndex        =   12
  48.       Top             =   840
  49.       Width           =   855
  50.    End
  51.    Begin SSFrame Frame3D1 
  52.       Caption         =   "Search :"
  53.       Font3D          =   3  'Inset w/light shading
  54.       FontBold        =   -1  'True
  55.       FontItalic      =   0   'False
  56.       FontName        =   "Arial"
  57.       FontSize        =   8.25
  58.       FontStrikethru  =   0   'False
  59.       FontUnderline   =   0   'False
  60.       Height          =   1455
  61.       Left            =   120
  62.       ShadowColor     =   1  'Black
  63.       ShadowStyle     =   1  'Raised
  64.       TabIndex        =   2
  65.       Top             =   720
  66.       Width           =   2655
  67.       Begin SSCheck Check3D9 
  68.          Caption         =   "Phone"
  69.          Font3D          =   3  'Inset w/light shading
  70.          FontBold        =   -1  'True
  71.          FontItalic      =   0   'False
  72.          FontName        =   "Arial"
  73.          FontSize        =   8.25
  74.          FontStrikethru  =   0   'False
  75.          FontUnderline   =   0   'False
  76.          Height          =   195
  77.          Left            =   1320
  78.          TabIndex        =   11
  79.          Top             =   960
  80.          Value           =   -1  'True
  81.          Width           =   1215
  82.       End
  83.       Begin SSCheck Check3D8 
  84.          Caption         =   "Information"
  85.          Font3D          =   3  'Inset w/light shading
  86.          FontBold        =   -1  'True
  87.          FontItalic      =   0   'False
  88.          FontName        =   "Arial"
  89.          FontSize        =   8.25
  90.          FontStrikethru  =   0   'False
  91.          FontUnderline   =   0   'False
  92.          Height          =   195
  93.          Left            =   1320
  94.          TabIndex        =   10
  95.          Top             =   720
  96.          Value           =   -1  'True
  97.          Width           =   1215
  98.       End
  99.       Begin SSCheck Check3D7 
  100.          Caption         =   "Message"
  101.          Font3D          =   3  'Inset w/light shading
  102.          FontBold        =   -1  'True
  103.          FontItalic      =   0   'False
  104.          FontName        =   "Arial"
  105.          FontSize        =   8.25
  106.          FontStrikethru  =   0   'False
  107.          FontUnderline   =   0   'False
  108.          Height          =   195
  109.          Left            =   1320
  110.          TabIndex        =   9
  111.          Top             =   480
  112.          Value           =   -1  'True
  113.          Width           =   1215
  114.       End
  115.       Begin SSCheck Check3D6 
  116.          Caption         =   "Country"
  117.          Font3D          =   3  'Inset w/light shading
  118.          FontBold        =   -1  'True
  119.          FontItalic      =   0   'False
  120.          FontName        =   "Arial"
  121.          FontSize        =   8.25
  122.          FontStrikethru  =   0   'False
  123.          FontUnderline   =   0   'False
  124.          Height          =   195
  125.          Left            =   1320
  126.          TabIndex        =   8
  127.          Top             =   240
  128.          Value           =   -1  'True
  129.          Width           =   1215
  130.       End
  131.       Begin SSCheck Check3D5 
  132.          Caption         =   "Zip Code"
  133.          Font3D          =   3  'Inset w/light shading
  134.          FontBold        =   -1  'True
  135.          FontItalic      =   0   'False
  136.          FontName        =   "Arial"
  137.          FontSize        =   8.25
  138.          FontStrikethru  =   0   'False
  139.          FontUnderline   =   0   'False
  140.          Height          =   195
  141.          Left            =   120
  142.          TabIndex        =   7
  143.          Top             =   1200
  144.          Value           =   -1  'True
  145.          Width           =   1095
  146.       End
  147.       Begin SSCheck Check3D4 
  148.          Caption         =   "State"
  149.          Font3D          =   3  'Inset w/light shading
  150.          FontBold        =   -1  'True
  151.          FontItalic      =   0   'False
  152.          FontName        =   "Arial"
  153.          FontSize        =   8.25
  154.          FontStrikethru  =   0   'False
  155.          FontUnderline   =   0   'False
  156.          Height          =   195
  157.          Left            =   120
  158.          TabIndex        =   6
  159.          Top             =   960
  160.          Value           =   -1  'True
  161.          Width           =   1095
  162.       End
  163.       Begin SSCheck Check3D3 
  164.          Caption         =   "City"
  165.          Font3D          =   3  'Inset w/light shading
  166.          FontBold        =   -1  'True
  167.          FontItalic      =   0   'False
  168.          FontName        =   "Arial"
  169.          FontSize        =   8.25
  170.          FontStrikethru  =   0   'False
  171.          FontUnderline   =   0   'False
  172.          Height          =   195
  173.          Left            =   120
  174.          TabIndex        =   5
  175.          Top             =   720
  176.          Value           =   -1  'True
  177.          Width           =   1095
  178.       End
  179.       Begin SSCheck Check3D2 
  180.          Caption         =   "Street"
  181.          Font3D          =   3  'Inset w/light shading
  182.          FontBold        =   -1  'True
  183.          FontItalic      =   0   'False
  184.          FontName        =   "Arial"
  185.          FontSize        =   8.25
  186.          FontStrikethru  =   0   'False
  187.          FontUnderline   =   0   'False
  188.          Height          =   195
  189.          Left            =   120
  190.          TabIndex        =   4
  191.          Top             =   480
  192.          Value           =   -1  'True
  193.          Width           =   1095
  194.       End
  195.       Begin SSCheck Check3D1 
  196.          Caption         =   "Name"
  197.          Font3D          =   3  'Inset w/light shading
  198.          FontBold        =   -1  'True
  199.          FontItalic      =   0   'False
  200.          FontName        =   "Arial"
  201.          FontSize        =   8.25
  202.          FontStrikethru  =   0   'False
  203.          FontUnderline   =   0   'False
  204.          Height          =   195
  205.          Left            =   120
  206.          TabIndex        =   3
  207.          Top             =   240
  208.          Value           =   -1  'True
  209.          Width           =   1095
  210.       End
  211.    End
  212.    Begin TextBox Text1 
  213.       FontBold        =   -1  'True
  214.       FontItalic      =   0   'False
  215.       FontName        =   "Arial"
  216.       FontSize        =   8.25
  217.       FontStrikethru  =   0   'False
  218.       FontUnderline   =   0   'False
  219.       Height          =   315
  220.       Left            =   120
  221.       MaxLength       =   35
  222.       TabIndex        =   1
  223.       Top             =   360
  224.       Width           =   3855
  225.    End
  226.    Begin Label Label1 
  227.       AutoSize        =   -1  'True
  228.       BackStyle       =   0  'Transparent
  229.       Caption         =   "Enter Search String Below:"
  230.       FontBold        =   -1  'True
  231.       FontItalic      =   0   'False
  232.       FontName        =   "Arial"
  233.       FontSize        =   8.25
  234.       FontStrikethru  =   0   'False
  235.       FontUnderline   =   0   'False
  236.       Height          =   210
  237.       Left            =   120
  238.       TabIndex        =   0
  239.       Top             =   120
  240.       Width           =   2190
  241.    End
  242.    Begin Menu MenuPaste 
  243.       Caption         =   "&Paste"
  244.    End
  245. Sub Command3D1_Click ()
  246. 'make sure one at least one check box checked
  247. OneChecked% = False
  248. If Check3D1.Value Or Check3D2.Value Or Check3D3.Value Or Check3D4.Value Then
  249.     OneChecked% = True
  250. ElseIf Check3D5.Value Or Check3D6.Value Or Check3D7.Value Or Check3D8.Value Or Check3D9.Value Then
  251.     OneChecked% = True
  252. End If
  253. 'make sure we have a text search string
  254. If Trim$(Text1.Text) <> "" And OneChecked% = True Then
  255.     Search.Tag = "YES"
  256.     Search.Tag = "NO"
  257. End If
  258. Search.Hide
  259. End Sub
  260. Sub Command3D2_Click ()
  261. 'setting form tag is easy way to pass info back and forth
  262. 'between forms
  263. Search.Tag = ""
  264. Search.Hide
  265. End Sub
  266. Sub Form_Load ()
  267. INIFile$ = ThePath & "Address.ini"
  268. Default$ = "NOCHECK"
  269. TC$ = GetPPKeyString$("Checked", "HasCheck", Default$, INIFile$)
  270. If TC$ <> "NOCHECK" Then
  271.     If InStr(TC$, "1") = 0 Then
  272.         Check3D1.Value = False
  273.     End If
  274.     If InStr(TC$, "2") = 0 Then
  275.         Check3D2.Value = False
  276.     End If
  277.     If InStr(TC$, "3") = 0 Then
  278.         Check3D3.Value = False
  279.     End If
  280.     If InStr(TC$, "4") = 0 Then
  281.         Check3D4.Value = False
  282.     End If
  283.     If InStr(TC$, "5") = 0 Then
  284.         Check3D5.Value = False
  285.     End If
  286.     If InStr(TC$, "6") = 0 Then
  287.         Check3D6.Value = False
  288.     End If
  289.     If InStr(TC$, "7") = 0 Then
  290.         Check3D7.Value = False
  291.     End If
  292.     If InStr(TC$, "8") = 0 Then
  293.         Check3D8.Value = False
  294.     End If
  295.     If InStr(TC$, "9") = 0 Then
  296.         Check3D9.Value = False
  297.     End If
  298. End If
  299. If Clipboard.GetFormat(1) Then
  300.     MenuPaste.Enabled = True
  301.     MenuPaste.Enabled = False
  302. End If
  303. Search.Top = Address.Top + ((Address.Height - Search.Height) \ 3)
  304. Search.Left = Address.Left + ((Address.Width - Search.Width) \ 2)
  305. End Sub
  306. Sub Form_Unload (Cancel As Integer)
  307. TC$ = ""
  308. If Check3D1.Value Then
  309.     TC$ = TC$ & "1"
  310. End If
  311. If Check3D2.Value Then
  312.     TC$ = TC$ & "2"
  313. End If
  314. If Check3D3.Value Then
  315.     TC$ = TC$ & "3"
  316. End If
  317. If Check3D4.Value Then
  318.     TC$ = TC$ & "4"
  319. End If
  320. If Check3D5.Value Then
  321.     TC$ = TC$ & "5"
  322. End If
  323. If Check3D6.Value Then
  324.     TC$ = TC$ & "6"
  325. End If
  326. If Check3D7.Value Then
  327.     TC$ = TC$ & "7"
  328. End If
  329. If Check3D8.Value Then
  330.     TC$ = TC$ & "8"
  331. End If
  332. If Check3D9.Value Then
  333.     TC$ = TC$ & "9"
  334. End If
  335. INIFile$ = ThePath & "address.ini"
  336. x% = WritePPKeyString%("Checked", "HasCheck", TC$, INIFile$)
  337. End Sub
  338. Sub MenuPaste_Click ()
  339. 'allows user to copy info from address and just paste
  340. If TypeOf Screen.ActiveControl Is TextBox Then
  341.     Screen.ActiveControl.SelText = Clipboard.GetText()
  342. End If
  343. End Sub
  344. Sub Text1_KeyPress (KeyAscii As Integer)
  345. 'don't allow these characters. they mess up sqlq search
  346. If KeyAscii = 91 Or KeyAscii = 93 Then
  347.     Beep            'stop [ and ] special to like
  348.     KeyAscii = 0
  349. End If
  350. End Sub
  351.