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/RegForm.frm (5.33 KB)

VERSION 5.00
Object = "{1B289251-696B-479D-B7BD-C670BD3C237C}#1.1#0"; "HLinkCtl.ocx"
Begin VB.Form RegForm 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "Enter Registration Information"
   ClientHeight    =   2535
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   5535
   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            =   "RegForm.frx":0000
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2535
   ScaleWidth      =   5535
   ShowInTaskbar   =   0   'False
   StartUpPosition =   1  'CenterOwner
   Begin HyperLinkControl.HyperLinkCtl hlRegister 
      Height          =   255
      Left            =   840
      TabIndex        =   4
      ToolTipText     =   "Click to get your registration code"
      Top             =   2120
      Width           =   1455
      _ExtentX        =   2566
      _ExtentY        =   450
      Caption         =   "&How to Register..."
      ClickColor      =   255
      CursorType      =   1
      EnabledType     =   1
      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       =   16711680
      HasHoverEffect  =   -1  'True
      HoverColor      =   255
   End
   Begin VB.CommandButton Command2 
      Cancel          =   -1  'True
      Caption         =   "Cancel"
      Height          =   375
      Left            =   4080
      TabIndex        =   6
      Top             =   2040
      Width           =   1335
   End
   Begin VB.CommandButton Command1 
      Caption         =   "OK"
      Default         =   -1  'True
      Enabled         =   0   'False
      Height          =   375
      Left            =   2640
      TabIndex        =   5
      Top             =   2040
      Width           =   1335
   End
   Begin VB.TextBox txtCode 
      Height          =   1335
      Left            =   840
      MaxLength       =   1000
      MultiLine       =   -1  'True
      TabIndex        =   3
      Top             =   480
      Width           =   4575
   End
   Begin VB.TextBox txtName 
      Height          =   315
      Left            =   840
      MaxLength       =   300
      TabIndex        =   1
      Top             =   120
      Width           =   4575
   End
   Begin VB.Image ImgKey 
      Height          =   480
      Left            =   120
      Picture         =   "RegForm.frx":000C
      Top             =   1920
      Width           =   480
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "&Code:"
      Height          =   255
      Left            =   120
      TabIndex        =   2
      Top             =   480
      Width           =   615
   End
   Begin VB.Label lblName 
      BackStyle       =   0  'Transparent
      Caption         =   "&Name:"
      Height          =   255
      Left            =   120
      TabIndex        =   0
      Top             =   165
      Width           =   615
   End
End
Attribute VB_Name = "RegForm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Declare Function GetSysColor Lib "user32" (ByVal nIndex As Long) As Long
Private Const COLOR_BTNFACE = 15

Private Sub Command1_Click()
    txtName.Enabled = False
    txtCode.Enabled = False
    If CheckRegistration(txtName.Text, txtCode.Text) = True Then
        sReg_Name = txtName.Text
        sReg_Code = txtCode.Text
        bReg_Valid = True
        MainForm.RegMenu.Enabled = False
        MsgBox "Registration successful." + vbCrLf + vbCrLf + "Thank you for your support.", vbInformation
    Else
        MsgBox "The registration code you entered is invalid." + vbCrLf + vbCrLf + "Please check your registration information and try again.", vbExclamation
        bReg_Valid = False
    End If
    Unload Me
End Sub

Private Sub Command2_Click()
    Unload Me
End Sub


Private Sub Form_Load()
    hlRegister.BackColor = GetSysColor(COLOR_BTNFACE)
End Sub


Private Sub hlRegister_Click()
    LaunchURL "http://quickquery.jasonspcsoftware.com/howtoregister.shtml"
End Sub


Private Sub hlRegister_KeyDown(KeyCode As Integer, Shift As Integer)
    If KeyCode = vbKeyReturn Then hlRegister_Click
End Sub


Private Sub hlRegister_KeyUp(KeyCode As Integer, Shift As Integer)
    If KeyCode = vbKeySpace Then hlRegister_Click
End Sub


Private Sub txtCode_Change()
    If txtName.Text = "" Or txtCode.Text = "" Then
        Command1.Enabled = False
    Else
        Command1.Enabled = True
    End If
End Sub

Private Sub txtName_Change()
    If txtName.Text = "" Or txtCode.Text = "" Then
        Command1.Enabled = False
    Else
        Command1.Enabled = True
    End If
End Sub


Download QuickQuery HL Edition/RegForm.frm

Back to file list


Back to project page