Projects

Find all our projects in development below.
All source code is GNU General Public License (GPL)

QuickQuery Half-Life Edition

Browsing QuickQuery HL Edition/DetailsForm.frm (7.37 KB)

VERSION 5.00
Object = "{248DD890-BB45-11CF-9ABC-0080C7E7B78D}#1.0#0"; "MSWINSCK.OCX"
Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0"; "COMCTL32.OCX"
Begin VB.Form DetailsForm 
   BorderStyle     =   4  'Fixed ToolWindow
   Caption         =   "Details"
   ClientHeight    =   4815
   ClientLeft      =   45
   ClientTop       =   315
   ClientWidth     =   4695
   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            =   "DetailsForm.frx":0000
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   4815
   ScaleWidth      =   4695
   ShowInTaskbar   =   0   'False
   StartUpPosition =   3  'Windows Default
   Begin VB.TextBox txtDNS 
      Alignment       =   2  'Center
      BackColor       =   &H8000000F&
      Height          =   315
      Left            =   120
      Locked          =   -1  'True
      TabIndex        =   4
      TabStop         =   0   'False
      Top             =   4920
      Width           =   4455
   End
   Begin VB.CommandButton Command2 
      Caption         =   "DNS &Address >>"
      Height          =   375
      Left            =   3120
      TabIndex        =   3
      ToolTipText     =   "Lookup the DNS name of the ip address"
      Top             =   4320
      Width           =   1455
   End
   Begin VB.TextBox txtCopy 
      Height          =   285
      Left            =   2160
      MultiLine       =   -1  'True
      TabIndex        =   5
      TabStop         =   0   'False
      Top             =   4320
      Visible         =   0   'False
      Width           =   735
   End
   Begin MSWinsockLib.Winsock WS_Details 
      Left            =   1680
      Top             =   4320
      _ExtentX        =   741
      _ExtentY        =   741
      _Version        =   393216
      Protocol        =   1
   End
   Begin VB.CommandButton Command1 
      Cancel          =   -1  'True
      Caption         =   "Close"
      Default         =   -1  'True
      Height          =   375
      Left            =   120
      TabIndex        =   2
      Top             =   4320
      Width           =   1215
   End
   Begin ComctlLib.ListView LVDetails 
      Height          =   3555
      Left            =   120
      TabIndex        =   1
      Top             =   360
      Width           =   4455
      _ExtentX        =   7858
      _ExtentY        =   6271
      View            =   3
      LabelEdit       =   1
      SortOrder       =   -1  'True
      MultiSelect     =   -1  'True
      LabelWrap       =   -1  'True
      HideSelection   =   -1  'True
      _Version        =   327682
      ForeColor       =   -2147483640
      BackColor       =   -2147483643
      BorderStyle     =   1
      Appearance      =   1
      NumItems        =   2
      BeginProperty ColumnHeader(1) {0713E8C7-850A-101B-AFC0-4210102A8DA7} 
         Key             =   ""
         Object.Tag             =   ""
         Text            =   "Property"
         Object.Width           =   3087
      EndProperty
      BeginProperty ColumnHeader(2) {0713E8C7-850A-101B-AFC0-4210102A8DA7} 
         SubItemIndex    =   1
         Key             =   ""
         Object.Tag             =   ""
         Text            =   "Value"
         Object.Width           =   3087
      EndProperty
   End
   Begin VB.Line lnLightShadow 
      BorderColor     =   &H80000014&
      X1              =   4560
      X2              =   120
      Y1              =   4095
      Y2              =   4095
   End
   Begin VB.Line lnDarkShadow 
      BorderColor     =   &H80000015&
      X1              =   4560
      X2              =   120
      Y1              =   4080
      Y2              =   4080
   End
   Begin VB.Label lblDetails 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "&Details for 127.0.0.1:"
      Height          =   195
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   1560
   End
   Begin VB.Menu LVDetailsPopupMenu 
      Caption         =   "LVDetailsPopupMenu"
      Visible         =   0   'False
      Begin VB.Menu RefreshMenu 
         Caption         =   "&Refresh"
      End
      Begin VB.Menu CopyMenu 
         Caption         =   "&Copy"
      End
   End
End
Attribute VB_Name = "DetailsForm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
    Unload Me
End Sub


Private Sub Command2_Click()
Dim TmpStr As String
    If Command2.Caption = "DNS &Address >>" Then
        Command2.Caption = "DNS &Address <<"
        txtDNS.TabStop = True
        txtDNS.Text = ""
        Height = txtDNS.Top + txtDNS.Height + (Height - ScaleHeight) + 105
        TmpStr = GetDNSname(WS_Details.RemoteHostIP)
        If TmpStr = "" Then TmpStr = "(unable to lookup ip address)"
        txtDNS.Text = TmpStr
    Else
        Height = txtDNS.Top + (Height - ScaleHeight) - 105
        Command2.Caption = "DNS &Address >>"
        txtDNS.TabStop = False
    End If
End Sub


Private Sub CopyMenu_Click()
Dim i As Integer
Dim i2 As Integer
    For i = 1 To LVDetails.ListItems.Count
        txtCopy.Text = txtCopy.Text + LVDetails.ListItems(i).Text
        For i2 = 2 To LVDetails.ColumnHeaders.Count
            txtCopy.Text = txtCopy.Text + vbTab + LVDetails.ListItems(i).SubItems(i2 - 1)
        Next i2
        txtCopy.Text = txtCopy.Text + vbCrLf
    Next i
    txtCopy.SelStart = 0
    txtCopy.SelLength = Len(txtCopy.Text)
    ClipboardCut txtCopy.hWnd
End Sub

Private Sub Form_Load()
    LV_FullRowSelect LVDetails
End Sub

Private Sub LVDetails_ColumnClick(ByVal ColumnHeader As ComctlLib.ColumnHeader)
    LVDetails.SortOrder = Abs(Not (LVDetails.SortOrder * -1))
    LVDetails.SortKey = ColumnHeader.Index - 1
    LVDetails.Sorted = True
End Sub


Private Sub LVDetails_KeyDown(KeyCode As Integer, Shift As Integer)
    If KeyCode = KEY_F5 Then RefreshMenu_Click
End Sub


Private Sub LVDetails_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
    If Button = vbRightButton Or (Button = vbLeftButton And IsMouseSwapped()) Then PopupMenu LVDetailsPopupMenu, vbPopupMenuRightButton
End Sub


Private Sub RefreshMenu_Click()
On Error Resume Next
    LVDetails.ListItems.Clear
    WS_Details.Close
    WS_Details.SendData "����infostring"
End Sub

Private Sub WS_Details_DataArrival(ByVal bytesTotal As Long)
On Error Resume Next
Dim RecvData As String
Dim Settings() As String
Dim i As Integer
    WS_Details.GetData RecvData
    WS_Details.Close
    LVDetails.Sorted = False
    LVDetails.SortOrder = lvwDescending
    If RecvData = "" Then Exit Sub
    RecvData = Mid(RecvData, InStr(RecvData, vbNullChar) + 2)
    If InStr(RecvData, vbNullChar) Then RecvData = Left(RecvData, InStr(RecvData, vbNullChar) - 1)
    Settings = Split(RecvData, "\")
    For i = 0 To UBound(Settings) Step 2
        LVDetails.ListItems.Add(, , Settings(i)).SubItems(1) = Settings(i + 1)
    Next i
End Sub

Download QuickQuery HL Edition/DetailsForm.frm

Back to file list


Back to project page