Projects

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

Player Search Quake 3 Arena Edition

Browsing LaunchForm.frm (4.28 KB)

VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form LaunchForm 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "Launch Quake 3 Arena & Connect"
   ClientHeight    =   1455
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   5055
   BeginProperty Font 
      Name            =   "Tahoma"
      Size            =   8.25
      Charset         =   0
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   Icon            =   "LaunchForm.frx":0000
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   1455
   ScaleWidth      =   5055
   ShowInTaskbar   =   0   'False
   StartUpPosition =   1  'CenterOwner
   Begin MSComDlg.CommonDialog EXEDialog 
      Left            =   120
      Top             =   0
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
      CancelError     =   -1  'True
      DialogTitle     =   "Browse for Quake 3 Executable"
      Filter          =   "Quake 3 Executable (quake3.exe)|quake3.exe|Program Files (*.exe)|*.exe|All Files (*.*)|*.*"
      InitDir         =   "C:\SIERRA\Half-Life"
   End
   Begin VB.CommandButton Command3 
      Caption         =   "..."
      Height          =   255
      Left            =   4640
      Style           =   1  'Graphical
      TabIndex        =   6
      ToolTipText     =   "Browse for Quake 3 Arena executable"
      Top             =   510
      Width           =   300
   End
   Begin VB.CommandButton Command2 
      Cancel          =   -1  'True
      Caption         =   "Close"
      Height          =   375
      Left            =   3840
      TabIndex        =   1
      Top             =   960
      Width           =   1095
   End
   Begin VB.CommandButton Command1 
      Caption         =   "&Launch"
      Default         =   -1  'True
      Height          =   375
      Left            =   2640
      TabIndex        =   0
      Top             =   960
      Width           =   1095
   End
   Begin VB.TextBox txtPath 
      Height          =   315
      Left            =   1800
      TabIndex        =   5
      Text            =   "C:\Quake III Arena\Quake3.exe"
      Top             =   480
      Width           =   2775
   End
   Begin VB.TextBox txtAddress 
      BackColor       =   &H8000000F&
      Height          =   315
      Left            =   1800
      Locked          =   -1  'True
      TabIndex        =   3
      Top             =   120
      Width           =   3135
   End
   Begin VB.Label Label2 
      Caption         =   "&Quake 3 Executable:"
      Height          =   255
      Left            =   120
      TabIndex        =   4
      Top             =   540
      Width           =   1575
   End
   Begin VB.Label Label1 
      Caption         =   "&Server Address:"
      Height          =   255
      Left            =   120
      TabIndex        =   2
      Top             =   180
      Width           =   1215
   End
End
Attribute VB_Name = "LaunchForm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub Command1_Click()
    If RunProgram(txtPath.Text, "+set fs_game " & MainForm.LVPlayersFound.SelectedItem.SubItems(3) & " +connect " & txtAddress.Text) = 0 Then
        MsgBox "Unable to launch Quake 3 Arena." & vbCrLf & vbCrLf & "Please verify that the path is correct.", vbCritical
    Else
        ExecutablePath = txtPath.Text
    End If
End Sub

Private Sub Command2_Click()
    Unload Me
End Sub

Private Sub Command3_Click()
On Error GoTo CancelErr
    EXEDialog.FileName = txtPath.Text
    EXEDialog.ShowOpen
    txtPath.Text = EXEDialog.FileName
    txtPath.SetFocus
    txtPath.SelStart = 0
    txtPath.SelLength = Len(txtPath.Text)
CancelErr:
End Sub

Private Sub Form_Load()
    EXEDialog.Flags = cdlOFNOverwritePrompt + cdlOFNLongNames + cdlOFNHideReadOnly
    CButton Command3
    txtAddress.Text = MainForm.LVPlayersFound.SelectedItem.Text + ":" + MainForm.LVPlayersFound.SelectedItem.SubItems(1)
    txtPath.Text = ExecutablePath
End Sub

Download LaunchForm.frm

Back to file list


Back to project page