Find all our projects in development below.
All source code is GNU General Public License (GPL)
Browsing QuickQuery HL Edition/FilterForm.frm (9.36 KB)
VERSION 5.00
Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0"; "COMCTL32.OCX"
Object = "{532444B8-10BE-4A24-9805-31C4599561A0}#1.0#0"; "vbODCTL.ocx"
Begin VB.Form FilterForm
BorderStyle = 3 'Fixed Dialog
Caption = "Filter Settings"
ClientHeight = 4335
ClientLeft = 45
ClientTop = 330
ClientWidth = 5175
ClipControls = 0 'False
BeginProperty Font
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Icon = "FilterForm.frx":0000
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4335
ScaleWidth = 5175
ShowInTaskbar = 0 'False
StartUpPosition = 1 'CenterOwner
Begin VB.CheckBox chkResponding
Caption = "A&re responding"
Height = 255
Left = 360
TabIndex = 0
Top = 600
Width = 2895
End
Begin CboLstOD.ODComboList cboGame
Height = 315
Left = 3360
TabIndex = 7
Top = 2400
Width = 1695
_ExtentX = 2990
_ExtentY = 556
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = -2147483630
ClientDraw = 1
Style = 0
DefaultItemHeight= 18
AutoComplete = -1 'True
FullRowSelect = -1 'True
MaxLength = 100
End
Begin VB.CheckBox chkProxy
Caption = "Are ¬ spectator proxies"
Height = 255
Index = 1
Left = 360
TabIndex = 10
Top = 3360
Width = 2895
End
Begin VB.CheckBox chkProxy
Caption = "Are &spectator proxies"
Height = 255
Index = 0
Left = 360
TabIndex = 9
Top = 3120
Width = 2895
End
Begin VB.CommandButton Command2
Cancel = -1 'True
Caption = "Cancel"
Height = 375
Left = 2640
TabIndex = 12
Top = 3840
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "&Filter"
Default = -1 'True
Height = 375
Left = 1320
TabIndex = 11
Top = 3840
Width = 1215
End
Begin VB.CheckBox chkNotFull
Caption = "&Are not full"
Height = 255
Left = 360
TabIndex = 8
Top = 2760
Width = 2895
End
Begin VB.CheckBox chkGame
Caption = "Are running &game:"
Height = 255
Left = 360
TabIndex = 6
Top = 2400
Width = 2895
End
Begin VB.TextBox txtMap
Enabled = 0 'False
Height = 315
Left = 3360
MaxLength = 100
TabIndex = 5
Top = 1995
Width = 1695
End
Begin VB.CheckBox chkMap
Caption = "Are running &map:"
Height = 255
Left = 360
TabIndex = 4
Top = 2040
Width = 2895
End
Begin VB.CheckBox chkNotEmpty
Caption = "&Have people currently playing"
Height = 255
Left = 360
TabIndex = 3
Top = 1680
Width = 2895
End
Begin VB.CheckBox chkDedicated
Caption = "Are running a &dedicated server"
Height = 255
Left = 360
TabIndex = 2
Top = 1320
Width = 2895
End
Begin VB.CheckBox chkLinux
Caption = "Are running a &linux server"
Height = 255
Left = 360
TabIndex = 1
Top = 960
Width = 2895
End
Begin ComctlLib.ImageList GameImgList
Left = 4440
Top = 2880
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
MaskColor = 12632256
_Version = 327682
End
Begin VB.Label Label1
Caption = "Show only servers which:"
BeginProperty Font
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 120
TabIndex = 13
Top = 120
Width = 2175
End
End
Attribute VB_Name = "FilterForm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub chkGame_Click()
On Error Resume Next
If chkGame.Value = 1 Then
cboGame.Enabled = True
cboGame.SetFocus
Else
cboGame.Enabled = False
End If
End Sub
Private Sub chkMap_Click()
On Error Resume Next
If chkMap.Value = 1 Then
txtMap.Enabled = True
txtMap.SetFocus
txtMap.SelStart = 0
txtMap.SelLength = Len(txtMap.Text)
Else
txtMap.Enabled = False
End If
End Sub
Private Sub chkProxy_Click(Index As Integer)
If chkProxy(Index).Value = 1 Then
chkProxy(Abs(Index - 1)).Value = 0
End If
End Sub
Private Sub Command1_Click()
Dim Filters As Integer
If InStr(txtMap.Text, "\") Then
MsgBox "Invalid character in map name.", vbExclamation
txtMap.SetFocus
txtMap.SelStart = 0
txtMap.SelLength = Len(txtMap.Text)
Exit Sub
End If
If InStr(cboGame.Text, "\") Then
MsgBox "Invalid character in game type.", vbExclamation
cboGame.SetFocus
Exit Sub
End If
Filters = 0
Filter_AreResponding = chkResponding.Value
Filter_Linux = chkLinux.Value
Filter_Dedicated = chkDedicated.Value
Filter_NotEmpty = chkNotEmpty.Value
Filter_RunningMap = chkMap.Value
Filter_MapName = txtMap.Text
Filter_RunningGame = chkGame.Value
Filter_GameName = cboGame.Text
Filter_NotFull = chkNotFull.Value
If chkProxy(0).Value = 1 Then
Filter_Proxy = 1
ElseIf chkProxy(1).Value = 1 Then
Filter_Proxy = 2
Else
Filter_Proxy = 0
End If
If Filter_AreResponding = 1 Then Filters = Filters + 1
If Filter_Linux = 1 Then Filters = Filters + 1
If Filter_Dedicated = 1 Then Filters = Filters + 1
If Filter_NotEmpty = 1 Then Filters = Filters + 1
If Filter_RunningMap = 1 Then Filters = Filters + 1
If Filter_RunningGame = 1 Then Filters = Filters + 1
If Filter_NotFull = 1 Then Filters = Filters + 1
If Filter_Proxy > 0 Then Filters = Filters + 1
MainForm.SBar.Panels(4).Text = Filters & " Filter" + IIf(Filters = 1, "", "s") + " In Use"
If Msg_Filter = 0 Then MsgBox "You will need to update for the filters to work properly.", vbExclamation
Unload Me
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
chkResponding.Value = Filter_AreResponding
chkLinux.Value = Filter_Linux
chkDedicated.Value = Filter_Dedicated
chkNotEmpty.Value = Filter_NotEmpty
chkMap.Value = Filter_RunningMap
txtMap.Text = Filter_MapName
chkGame.Value = Filter_RunningGame
cboGame.Text = Filter_GameName
chkNotFull.Value = Filter_NotFull
If Filter_Proxy > 0 Then chkProxy(Filter_Proxy - 1).Value = 1
With GameImgList
.ImageWidth = 16
.ImageHeight = 16
.ListImages.Add , , LoadResPicture(2, 1)
.ListImages.Add , , LoadResPicture(3, 1)
.ListImages.Add , , LoadResPicture(4, 1)
.ListImages.Add , , LoadResPicture(6, 1)
.ListImages.Add , , LoadResPicture(8, 1)
.ListImages.Add , , LoadResPicture(10, 1)
.ListImages.Add , , LoadResPicture(12, 1)
.ListImages.Add , , LoadResPicture(14, 1)
End With
With cboGame
.ImageList = GameImgList
.AddItemAndData "action", 6
.AddItemAndData "cstrike", 2
.AddItemAndData "dmc", 3
.AddItemAndData "dod", 4
.AddItemAndData "firearms", 5
.AddItemAndData "frontline", 7
.AddItemAndData "tfc", 1
.AddItemAndData "valve", 0
End With
End Sub
Download QuickQuery HL Edition/FilterForm.frm