Find all our projects in development below.
All source code is GNU General Public License (GPL)
Browsing QuickQuery HL Edition/OptionsForm.frm (34.39 KB)
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0"; "COMCTL32.OCX"
Begin VB.Form OptionsForm
BorderStyle = 3 'Fixed Dialog
Caption = "Options"
ClientHeight = 3375
ClientLeft = 45
ClientTop = 330
ClientWidth = 5295
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 = "OptionsForm.frx":0000
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3375
ScaleWidth = 5295
ShowInTaskbar = 0 'False
StartUpPosition = 1 'CenterOwner
Begin VB.PictureBox TSBack
AutoRedraw = -1 'True
BorderStyle = 0 'None
Height = 1830
Index = 0
Left = 160
ScaleHeight = 1830
ScaleWidth = 4935
TabIndex = 39
TabStop = 0 'False
Top = 740
Width = 4935
Begin VB.CheckBox chkFilterFav
Caption = "&Use filters when refreshing the favorites list"
Height = 255
Left = 120
TabIndex = 5
Top = 1320
Width = 4575
End
Begin VB.CheckBox chkHotTrack
Caption = "&Enable item hot tracking for main listview window"
Height = 255
Left = 120
TabIndex = 1
Top = 120
Value = 1 'Checked
Width = 4575
End
Begin VB.CheckBox chkSaveFile
Caption = "&Save the server list on exit to file:"
Height = 255
Left = 120
TabIndex = 2
Top = 480
Value = 1 'Checked
Width = 2775
End
Begin VB.TextBox txtSaveFile
Height = 315
Left = 360
TabIndex = 3
Text = "serverlist.txt"
Top = 840
Width = 3855
End
Begin VB.CommandButton Command3
Caption = "..."
Height = 255
Left = 4320
Style = 1 'Graphical
TabIndex = 4
ToolTipText = "Browse"
Top = 860
Width = 300
End
End
Begin VB.PictureBox TSBack
AutoRedraw = -1 'True
BorderStyle = 0 'None
Height = 1830
Index = 2
Left = 160
ScaleHeight = 1830
ScaleWidth = 4935
TabIndex = 41
TabStop = 0 'False
Top = 740
Width = 4935
Begin VB.CheckBox chkUnload
Caption = "U&nload unused winsock controls (can cause problems)"
Height = 255
Left = 120
TabIndex = 16
Top = 1200
Width = 4575
End
Begin VB.TextBox txtTimeout
Height = 315
Left = 2160
MaxLength = 5
TabIndex = 13
Text = "500"
Top = 480
Width = 615
End
Begin VB.TextBox txtMaxConn
Alignment = 2 'Center
Height = 315
Left = 480
MaxLength = 2
TabIndex = 11
Text = "40"
Top = 120
Width = 495
End
Begin VB.TextBox txtARRate
Height = 315
Left = 2160
MaxLength = 6
TabIndex = 15
Text = "2000"
Top = 840
Width = 615
End
Begin VB.Label Label12
BackStyle = 0 'Transparent
Caption = "(in milliseconds)"
Height = 255
Left = 2880
TabIndex = 45
Top = 540
Width = 1215
End
Begin VB.Label Label10
BackStyle = 0 'Transparent
Caption = "&Query request timeout:"
Height = 255
Left = 120
TabIndex = 12
Top = 540
Width = 1830
End
Begin VB.Label Label9
BackStyle = 0 'Transparent
Caption = "simultaneous udp connections"
Height = 255
Left = 1080
TabIndex = 44
Top = 180
Width = 2295
End
Begin VB.Label Label7
BackStyle = 0 'Transparent
Caption = "&Use"
Height = 255
Left = 120
TabIndex = 10
Top = 180
Width = 375
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "&AutoRefresh refresh rate:"
Height = 255
Left = 120
TabIndex = 14
Top = 900
Width = 1935
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "(in milliseconds)"
Height = 255
Left = 2880
TabIndex = 43
Top = 900
Width = 1215
End
End
Begin VB.PictureBox TSBack
AutoRedraw = -1 'True
BorderStyle = 0 'None
Height = 1830
Index = 4
Left = 160
ScaleHeight = 1830
ScaleWidth = 4935
TabIndex = 42
TabStop = 0 'False
Top = 740
Width = 4935
Begin VB.CheckBox chkCloseCD
Caption = "Close &Cheating-Death if running"
Height = 255
Left = 360
TabIndex = 22
Top = 1560
Value = 1 'Checked
Width = 4320
End
Begin VB.CheckBox chkClosePB
Caption = "Close &PunkBuster if running"
Height = 255
Left = 360
TabIndex = 21
Top = 1200
Value = 1 'Checked
Width = 4320
End
Begin VB.CheckBox chkResetMSN
Caption = "&Reset MSN Messenger status back to previous state"
Height = 255
Left = 360
TabIndex = 20
Top = 840
Value = 1 'Checked
Width = 4320
End
Begin VB.CheckBox chkWait
Caption = "&Wait for Half-Life to terminate"
Height = 255
Left = 120
TabIndex = 19
Top = 120
Value = 1 'Checked
Width = 4575
End
Begin VB.Label lblTerminate
BackStyle = 0 'Transparent
Caption = "On Half-Life termination, do the following:"
Height = 255
Left = 380
TabIndex = 46
Top = 480
Width = 3375
End
End
Begin VB.PictureBox TSBack
AutoRedraw = -1 'True
BorderStyle = 0 'None
Height = 1830
Index = 3
Left = 160
ScaleHeight = 1830
ScaleWidth = 4935
TabIndex = 47
TabStop = 0 'False
Top = 740
Width = 4935
Begin VB.ComboBox cboPriority
Height = 315
ItemData = "OptionsForm.frx":000C
Left = 120
List = "OptionsForm.frx":0022
Style = 2 'Dropdown List
TabIndex = 18
Top = 360
Width = 3015
End
Begin VB.Label lblNote
BackStyle = 0 'Transparent
Caption = "A higher priority may increase performance, but may also make the system unstable."
Height = 615
Index = 1
Left = 720
TabIndex = 49
Top = 740
Width = 2295
End
Begin VB.Label lblNote
BackStyle = 0 'Transparent
Caption = "Note:"
Height = 255
Index = 0
Left = 120
TabIndex = 48
Top = 740
Width = 495
End
Begin VB.Label lblPriority
BackStyle = 0 'Transparent
Caption = "&Launch Half-Life with a process priority of:"
Height = 255
Left = 120
TabIndex = 17
Top = 120
Width = 3135
End
End
Begin VB.PictureBox TSBack
AutoRedraw = -1 'True
BorderStyle = 0 'None
Height = 1830
Index = 5
Left = 160
ScaleHeight = 1830
ScaleWidth = 4935
TabIndex = 51
TabStop = 0 'False
Top = 740
Width = 4935
Begin VB.CheckBox chkCDMsg
Caption = "Suppress the 'U&nable to launch Cheating-Death' message"
Height = 255
Left = 120
TabIndex = 26
Top = 1200
Width = 4455
End
Begin VB.CheckBox chkPBPaladinMsg
Caption = "Suppress the '&Do not run PunkBuster with Paladin' message"
Height = 255
Left = 120
TabIndex = 25
Top = 840
Width = 4575
End
Begin VB.CheckBox chkFilterMsg
Caption = "Suppress the '&Update after filter change' message"
Height = 255
Left = 120
TabIndex = 23
Top = 120
Width = 4455
End
Begin VB.CheckBox chkPBMsg
Caption = "Suppress the 'Unable to &launch PunkBuster' message"
Height = 255
Left = 120
TabIndex = 24
Top = 480
Width = 4455
End
Begin VB.CheckBox chkMSNMsg
Caption = "Suppress the 'Unable to &change MSN status' message"
Height = 255
Left = 120
TabIndex = 27
Top = 1560
Value = 1 'Checked
Width = 4455
End
End
Begin VB.PictureBox TSBack
AutoRedraw = -1 'True
BorderStyle = 0 'None
Height = 1830
Index = 7
Left = 160
ScaleHeight = 1830
ScaleWidth = 4935
TabIndex = 52
TabStop = 0 'False
Top = 740
Width = 4935
Begin VB.CheckBox chkAutoCD
Caption = "Au&tomatically launch Cheating-Death if server requires it"
Height = 255
Left = 120
TabIndex = 34
Top = 840
Width = 4575
End
Begin VB.ComboBox cboSort
Enabled = 0 'False
Height = 315
ItemData = "OptionsForm.frx":0061
Left = 3600
List = "OptionsForm.frx":0095
Style = 2 'Dropdown List
TabIndex = 36
Top = 1185
Width = 1095
End
Begin VB.CheckBox chkSort
Caption = "&Sort the servers list upon completion using:"
Height = 255
Left = 120
TabIndex = 35
Top = 1200
Width = 3495
End
Begin VB.CheckBox chkAutoPaladin
Caption = "A&utomatically launch Paladin if server requires it"
Height = 255
Left = 120
TabIndex = 33
Top = 480
Width = 4575
End
Begin VB.CheckBox chkAutoPB
Caption = "&Automatically launch PunkBuster if server requires it"
Height = 255
Left = 120
TabIndex = 32
Top = 120
Width = 4575
End
End
Begin VB.PictureBox TSBack
AutoRedraw = -1 'True
BorderStyle = 0 'None
Height = 1830
Index = 6
Left = 160
ScaleHeight = 1830
ScaleWidth = 4935
TabIndex = 50
TabStop = 0 'False
Top = 740
Width = 4935
Begin VB.CommandButton Command6
Caption = "&Remove"
Enabled = 0 'False
Height = 375
Left = 120
TabIndex = 30
Top = 1080
Width = 855
End
Begin VB.CommandButton Command5
Caption = "&Edit..."
Enabled = 0 'False
Height = 375
Left = 120
TabIndex = 29
Top = 600
Width = 855
End
Begin VB.CommandButton Command4
Caption = "&Add..."
Height = 375
Left = 120
TabIndex = 28
Top = 120
Width = 855
End
Begin ComctlLib.ListView LVPrograms
Height = 1455
Left = 1080
TabIndex = 31
Top = 120
Width = 3615
_ExtentX = 6376
_ExtentY = 2566
View = 3
LabelEdit = 1
LabelWrap = -1 'True
HideSelection = 0 'False
_Version = 327682
ForeColor = -2147483640
BackColor = -2147483643
BorderStyle = 1
Appearance = 1
NumItems = 6
BeginProperty ColumnHeader(1) {0713E8C7-850A-101B-AFC0-4210102A8DA7}
Key = ""
Object.Tag = ""
Text = "Target"
Object.Width = 3616
EndProperty
BeginProperty ColumnHeader(2) {0713E8C7-850A-101B-AFC0-4210102A8DA7}
SubItemIndex = 1
Key = ""
Object.Tag = ""
Text = "Start in"
Object.Width = 2646
EndProperty
BeginProperty ColumnHeader(3) {0713E8C7-850A-101B-AFC0-4210102A8DA7}
SubItemIndex = 2
Key = ""
Object.Tag = ""
Text = "Cmd Line"
Object.Width = 2646
EndProperty
BeginProperty ColumnHeader(4) {0713E8C7-850A-101B-AFC0-4210102A8DA7}
SubItemIndex = 3
Key = ""
Object.Tag = ""
Text = "Run"
Object.Width = 706
EndProperty
BeginProperty ColumnHeader(5) {0713E8C7-850A-101B-AFC0-4210102A8DA7}
Alignment = 2
SubItemIndex = 4
Key = ""
Object.Tag = ""
Text = "PP"
Object.Width = 353
EndProperty
BeginProperty ColumnHeader(6) {0713E8C7-850A-101B-AFC0-4210102A8DA7}
Alignment = 1
SubItemIndex = 5
Key = ""
Object.Tag = ""
Text = "Close"
Object.Width = 706
EndProperty
End
End
Begin VB.PictureBox TSBack
AutoRedraw = -1 'True
BorderStyle = 0 'None
Height = 1830
Index = 1
Left = 160
ScaleHeight = 1830
ScaleWidth = 4935
TabIndex = 40
TabStop = 0 'False
Top = 740
Width = 4935
Begin VB.CheckBox chkMax
Caption = "&Max amount of servers to download:"
Height = 255
Left = 120
TabIndex = 8
Top = 525
Width = 3015
End
Begin VB.TextBox txtMax
Enabled = 0 'False
Height = 315
Left = 3160
MaxLength = 6
TabIndex = 9
Text = "5000"
Top = 480
Width = 855
End
Begin VB.ComboBox cboMaster
Height = 315
ItemData = "OptionsForm.frx":0127
Left = 600
List = "OptionsForm.frx":0134
TabIndex = 7
Text = "half-life.east.won.net:27010"
Top = 120
Width = 3495
End
Begin VB.Label Label18
BackStyle = 0 'Transparent
Caption = "&Use:"
Height = 255
Left = 120
TabIndex = 6
Top = 180
Width = 375
End
End
Begin MSComDlg.CommonDialog FileDialog
Left = 120
Top = 2760
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin VB.CommandButton Command2
Cancel = -1 'True
Caption = "Cancel"
Height = 375
Left = 3960
TabIndex = 38
Top = 2880
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "OK"
Default = -1 'True
Height = 375
Left = 2640
TabIndex = 37
Top = 2880
Width = 1215
End
Begin ComctlLib.TabStrip OptnTab
Height = 2535
Left = 120
TabIndex = 0
Top = 120
Width = 5055
_ExtentX = 8916
_ExtentY = 4471
MultiRow = -1 'True
_Version = 327682
BeginProperty Tabs {0713E432-850A-101B-AFC0-4210102A8DA7}
NumTabs = 8
BeginProperty Tab1 {0713F341-850A-101B-AFC0-4210102A8DA7}
Caption = "General"
Key = ""
Object.Tag = ""
ImageVarType = 2
EndProperty
BeginProperty Tab2 {0713F341-850A-101B-AFC0-4210102A8DA7}
Caption = "Master Server"
Key = ""
Object.Tag = ""
ImageVarType = 2
EndProperty
BeginProperty Tab3 {0713F341-850A-101B-AFC0-4210102A8DA7}
Caption = "Server Query"
Key = ""
Object.Tag = ""
ImageVarType = 2
EndProperty
BeginProperty Tab4 {0713F341-850A-101B-AFC0-4210102A8DA7}
Caption = "Launch"
Key = ""
Object.Tag = ""
ImageVarType = 2
EndProperty
BeginProperty Tab5 {0713F341-850A-101B-AFC0-4210102A8DA7}
Caption = "Terminate"
Key = ""
Object.Tag = ""
ImageVarType = 2
EndProperty
BeginProperty Tab6 {0713F341-850A-101B-AFC0-4210102A8DA7}
Caption = "Messages"
Key = ""
Object.Tag = ""
ImageVarType = 2
EndProperty
BeginProperty Tab7 {0713F341-850A-101B-AFC0-4210102A8DA7}
Caption = "Programs"
Key = ""
Object.Tag = ""
ImageVarType = 2
EndProperty
BeginProperty Tab8 {0713F341-850A-101B-AFC0-4210102A8DA7}
Caption = "Miscellaneous"
Key = ""
Object.Tag = ""
ImageVarType = 2
EndProperty
EndProperty
End
End
Attribute VB_Name = "OptionsForm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Const GWL_STYLE = (-16)
Private Const TCS_HOTTRACK = &H40
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Public Sub HotTrackTabStrip(hWnd As Long)
SetWindowLong hWnd, GWL_STYLE, GetWindowLong(hWnd, GWL_STYLE) Or TCS_HOTTRACK
End Sub
Sub SetTabIndex(TabIndex As Integer)
Dim i As Integer
For i = TSBack.LBound To TSBack.UBound
TSBack(i).Enabled = IIf(TabIndex = i, True, False)
Next i
TSBack(TabIndex).ZOrder 0
End Sub
Private Sub chkMax_Click()
On Error Resume Next
txtMax.Enabled = CBool(chkMax.Value)
If txtMax.Enabled Then
txtMax.SetFocus
txtMax.SelStart = 0
txtMax.SelLength = Len(txtMax.Text)
End If
End Sub
Private Sub chkSaveFile_Click()
On Error Resume Next
txtSaveFile.Enabled = CBool(chkSaveFile.Value)
Command3.Enabled = txtSaveFile.Enabled
If txtSaveFile.Enabled Then
txtSaveFile.SetFocus
txtSaveFile.SelStart = 0
txtSaveFile.SelLength = Len(txtSaveFile.Text)
End If
End Sub
Private Sub chkSort_Click()
On Error Resume Next
If chkSort.Value = 0 Then
cboSort.Enabled = False
Else
cboSort.Enabled = True
cboSort.SetFocus
End If
End Sub
Private Sub chkWait_Click()
If chkWait.Value = 0 Then
lblTerminate.Enabled = False
chkResetMSN.Enabled = False
chkClosePB.Enabled = False
chkCloseCD.Enabled = False
Else
lblTerminate.Enabled = True
chkResetMSN.Enabled = True
chkClosePB.Enabled = True
chkCloseCD.Enabled = True
End If
End Sub
Private Sub Command1_Click()
Dim i As Long
If chkSaveFile.Value = 1 And txtSaveFile.Text = "" Then
MsgBox "Please enter file name.", vbExclamation
OptnTab.Tabs(1).Selected = True
txtSaveFile.SetFocus
txtSaveFile.Text = "serverlist.txt"
txtSaveFile.SelStart = 0
txtSaveFile.SelLength = Len(txtSaveFile.Text)
Exit Sub
End If
If Val(txtMaxConn.Text) < 1 Then
MsgBox "Please enter a number greater than zero.", vbExclamation
OptnTab.Tabs(3).Selected = True
txtMaxConn.SetFocus
txtMaxConn.Text = "20"
txtMaxConn.SelStart = 0
txtMaxConn.SelLength = Len(txtMaxConn.Text)
Exit Sub
End If
If Val(txtTimeout.Text) < 1 Or Val(txtTimeout.Text) > 65535 Then
MsgBox "Please enter a number greater than zero and less than 65535.", vbExclamation
OptnTab.Tabs(3).Selected = True
txtTimeout.SetFocus
txtTimeout.Text = "500"
txtTimeout.SelStart = 0
txtTimeout.SelLength = Len(txtTimeout.Text)
Exit Sub
End If
If Val(txtARRate.Text) < 1 Or Val(txtARRate.Text) > 65535 Then
MsgBox "Please enter a number greater than zero and less than 65535.", vbExclamation
OptnTab.Tabs(3).Selected = True
txtARRate.SetFocus
txtARRate.Text = "2000"
txtARRate.SelStart = 0
txtARRate.SelLength = Len(txtARRate.Text)
Exit Sub
End If
If Val(txtMax.Text) < 1 And chkMax.Value = 1 Then
MsgBox "Please enter a number greater than zero.", vbExclamation
OptnTab.Tabs(2).Selected = True
txtMax.SetFocus
txtMax.Text = "1000"
txtMax.SelStart = 0
txtMax.SelLength = Len(txtMax.Text)
Exit Sub
End If
If cboMaster.Text = "" Then
MsgBox "Please enter a master server address or choose one.", vbExclamation
OptnTab.Tabs(2).Selected = True
cboMaster.SetFocus
Exit Sub
End If
If (cboPriority.ListIndex = 1 Or cboPriority.ListIndex = 3) And Not IsCompatible() Then
MsgBox "Below Normal and Above Normal process priorities are only available on Windows 2000 or later operating systems.", vbExclamation
OptnTab.Tabs(4).Selected = True
cboPriority.SetFocus
Exit Sub
End If
Optn_LVHotTrack = chkHotTrack.Value
Optn_SaveServers = chkSaveFile.Value
Optn_ServerFile = txtSaveFile.Text
Optn_AutoPB = chkAutoPB.Value
Optn_AutoPaladin = chkAutoPaladin.Value
Optn_AutoCD = chkAutoCD.Value
Optn_MasterServer = cboMaster.Text
Optn_LimitServers = chkMax.Value
Optn_MaxServers = txtMax.Text
Optn_MaxConnections = txtMaxConn.Text
Optn_RequestTimeout = txtTimeout.Text
Optn_AutoRefreshRate = txtARRate.Text
Optn_UnloadWSControls = chkUnload.Value
Optn_ProcessPriority = cboPriority.ListIndex
Optn_WaitForReturn = chkWait.Value
Optn_ResetMSNStatus = chkResetMSN.Value
Optn_ClosePB = chkClosePB.Value
Optn_CloseCD = chkCloseCD.Value
Msg_Filter = chkFilterMsg.Value
Msg_PBError = chkPBMsg.Value
Msg_PBPaladinError = chkPBPaladinMsg.Value
Msg_CDError = chkCDMsg.Value
Msg_MSNError = chkMSNMsg.Value
Optn_FilterFavorites = chkFilterFav.Value
Optn_bSort = chkSort.Value
Optn_iSort = cboSort.ListIndex
ReDim ProgramsList(LVPrograms.ListItems.Count)
For i = 1 To LVPrograms.ListItems.Count
ProgramsList(i).Enabled = LV_IsItemChecked(LVPrograms.hWnd, i - 1)
ProgramsList(i).Target = LVPrograms.ListItems(i).Text
ProgramsList(i).Path = LVPrograms.ListItems(i).SubItems(1)
ProgramsList(i).CmdLine = LVPrograms.ListItems(i).SubItems(2)
Select Case LCase(LVPrograms.SelectedItem.SubItems(3))
Case "minimized"
ProgramsList(i).RunMode = 1
Case "maximized"
ProgramsList(i).RunMode = 2
Case Else
ProgramsList(i).RunMode = 0
End Select
If Val(LVPrograms.SelectedItem.SubItems(4)) >= 0 And _
Val(LVPrograms.SelectedItem.SubItems(4)) <= 5 Then _
ProgramsList(i).ProcessPriority = Val(LVPrograms.SelectedItem.SubItems(4))
Select Case LCase(LVPrograms.SelectedItem.SubItems(5))
Case "true"
ProgramsList(i).iClose = 1
Case Else
ProgramsList(i).iClose = 0
End Select
Next i
If Optn_LVHotTrack = 0 Then
LV_HotTracking MainForm.LVServers, False
Else
LV_HotTracking MainForm.LVServers, True
End If
Unload Me
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Command3_Click()
On Error GoTo CancelErr
FileDialog.Filename = txtSaveFile.Text
FileDialog.ShowOpen
txtSaveFile.Text = FileDialog.Filename
txtSaveFile.SetFocus
txtSaveFile.SelStart = 0
txtSaveFile.SelLength = Len(txtSaveFile.Text)
CancelErr:
End Sub
Private Sub Command4_Click()
AddProgramForm.Caption = "Add Program"
AddProgramForm.ListIndex = 0
AddProgramForm.Show 1
End Sub
Private Sub Command5_Click()
With AddProgramForm
.Caption = "Edit Program"
.ListIndex = LVPrograms.SelectedItem.Index
.txtTarget.Text = LVPrograms.SelectedItem.Text
.txtTarget.SelStart = 0
.txtTarget.SelLength = Len(.txtTarget.Text)
.txtPath.Text = LVPrograms.SelectedItem.SubItems(1)
.txtCmd.Text = LVPrograms.SelectedItem.SubItems(2)
Select Case LCase(LVPrograms.SelectedItem.SubItems(3))
Case "minimized"
.cboRun.ListIndex = 1
Case "maximized"
.cboRun.ListIndex = 2
Case Else
.cboRun.ListIndex = 0
End Select
If Val(LVPrograms.SelectedItem.SubItems(4)) >= 0 And _
Val(LVPrograms.SelectedItem.SubItems(4)) <= 5 Then _
.cboPP.ListIndex = Val(LVPrograms.SelectedItem.SubItems(4))
Select Case LCase(LVPrograms.SelectedItem.SubItems(5))
Case "true"
.chkClose.Value = 1
Case Else
.chkClose.Value = 0
End Select
.Show 1
End With
End Sub
Private Sub Command6_Click()
LVPrograms.ListItems.Remove LVPrograms.SelectedItem.Index
If Not (LVPrograms.SelectedItem Is Nothing) Then
LVPrograms.SelectedItem.Selected = True
Else
Command5.Enabled = False
Command6.Enabled = False
End If
End Sub
Private Sub Form_Load()
Dim i As Long
FileDialog.flags = cdlOFNOverwritePrompt + cdlOFNLongNames + cdlOFNHideReadOnly
CButton Command3
chkHotTrack.Value = Optn_LVHotTrack
chkSaveFile.Value = Optn_SaveServers
txtSaveFile.Text = Optn_ServerFile
chkAutoPB.Value = Optn_AutoPB
chkAutoPaladin.Value = Optn_AutoPaladin
chkAutoCD.Value = Optn_AutoCD
cboMaster.Text = Optn_MasterServer
chkMax.Value = Optn_LimitServers
txtMax.Text = Optn_MaxServers
txtMaxConn.Text = Optn_MaxConnections
txtTimeout.Text = Optn_RequestTimeout
txtARRate.Text = Optn_AutoRefreshRate
chkUnload.Value = Optn_UnloadWSControls
cboPriority.ListIndex = Optn_ProcessPriority
chkWait.Value = Optn_WaitForReturn
chkResetMSN.Value = Optn_ResetMSNStatus
chkClosePB.Value = Optn_ClosePB
chkCloseCD.Value = Optn_CloseCD
chkFilterMsg.Value = Msg_Filter
chkPBMsg.Value = Msg_PBError
chkPBPaladinMsg.Value = Msg_PBPaladinError
chkCDMsg.Value = Msg_CDError
chkMSNMsg.Value = Msg_MSNError
chkFilterFav.Value = Optn_FilterFavorites
chkSort.Value = Optn_bSort
cboSort.ListIndex = Optn_iSort
LV_FlatColumnHeaders LVPrograms
LV_FullRowSelect LVPrograms
LV_CheckBoxes LVPrograms
For i = 1 To UBound(ProgramsList)
With LVPrograms.ListItems.Add()
.Text = ProgramsList(i).Target
.SubItems(1) = ProgramsList(i).Path
.SubItems(2) = ProgramsList(i).CmdLine
Select Case ProgramsList(i).RunMode
Case 1
.SubItems(3) = "Minimized"
Case 2
.SubItems(3) = "Maximized"
Case Else
.SubItems(3) = "Normal"
End Select
.SubItems(4) = CStr(ProgramsList(i).ProcessPriority)
Select Case ProgramsList(i).iClose
Case 1
.SubItems(5) = "True"
Case Else
.SubItems(5) = "False"
End Select
End With
If ProgramsList(i).Enabled = True Then LV_CheckItem LVPrograms, i - 1, True
Next i
HotTrackTabStrip OptnTab.hWnd
SubClassTabstripWnd OptnTab
SetTabIndex 0
End Sub
Private Sub Form_Unload(Cancel As Integer)
UnSubClassTabstripWnd OptnTab
End Sub
Private Sub LVPrograms_ItemClick(ByVal Item As ComctlLib.ListItem)
Command5.Enabled = True
Command6.Enabled = True
End Sub
Private Sub OptnTab_Click()
SetTabIndex OptnTab.SelectedItem.Index - 1
End Sub
Private Sub txtARRate_KeyPress(KeyAscii As Integer)
If KeyAscii >= 48 And KeyAscii <= 57 Or KeyAscii = 8 Then Exit Sub
KeyAscii = 0
End Sub
Private Sub txtARRate_LostFocus()
txtARRate.Text = Val(txtARRate.Text)
End Sub
Private Sub txtMax_KeyPress(KeyAscii As Integer)
If KeyAscii >= 48 And KeyAscii <= 57 Or KeyAscii = 8 Then Exit Sub
KeyAscii = 0
End Sub
Private Sub txtMax_LostFocus()
txtMax.Text = Val(txtMax.Text)
End Sub
Private Sub txtMaxConn_KeyPress(KeyAscii As Integer)
If KeyAscii >= 48 And KeyAscii <= 57 Or KeyAscii = 8 Then Exit Sub
KeyAscii = 0
End Sub
Private Sub txtMaxConn_LostFocus()
txtMaxConn.Text = Val(txtMaxConn.Text)
End Sub
Private Sub txtTimeout_KeyPress(KeyAscii As Integer)
If KeyAscii >= 48 And KeyAscii <= 57 Or KeyAscii = 8 Then Exit Sub
KeyAscii = 0
End Sub
Private Sub txtTimeout_LostFocus()
txtTimeout.Text = Val(txtTimeout.Text)
End Sub
Download QuickQuery HL Edition/OptionsForm.frm