splash.frm

 VERSION 5.00
Begin VB.Form splash
   Appearance      =   0  'Flat
   BackColor       =   &H00FFFFFF&
   BorderStyle     =   1  'Fixed Single
   ClientHeight    =   4365
   ClientLeft      =   15
   ClientTop       =   15
   ClientWidth     =   5100
   ControlBox      =   0   'False
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   4365
   ScaleWidth      =   5100
   StartUpPosition =   2  'CenterScreen
   Begin VB.Image Image3
      Height          =   480
      Left            =   3360
      Picture         =   "splash.frx":0000
      Top             =   -120
      Width           =   480
   End
   Begin VB.Label Label10
      BackColor       =   &H00FFFFFF&
      BeginProperty Font
         Name            =   "Tahoma"
         Size            =   6.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   1200
      TabIndex        =   9
      Top             =   4150
      Width           =   3735
   End
   Begin VB.Label Label9
      BackColor       =   &H00000000&
      BeginProperty Font
         Name            =   "Verdana"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   255
      Left            =   0
      TabIndex        =   8
      Top             =   0
      Width           =   3855
   End
   Begin VB.Label Label8
      BackColor       =   &H00FFFFFF&
      BeginProperty Font
         Name            =   "Arial Black"
         Size            =   20.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   240
      TabIndex        =   7
      Top             =   1920
      Width           =   4935
   End
   Begin VB.Image Image2
      Height          =   2325
      Left            =   1680
      Picture         =   "splash.frx":0442
      Top             =   240
      Width           =   1965
   End
   Begin VB.Image Image1
      Height          =   1050
      Left            =   120
      Picture         =   "splash.frx":46F1
      Top             =   3240
      Width           =   900
   End
   Begin VB.Label Label7
      BackColor       =   &H00FFFFFF&
      Caption         =   "The maximum extend possible under law."
      BeginProperty Font
         Name            =   "Tahoma"
         Size            =   6.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   1200
      TabIndex        =   6
      Top             =   3980
      Width           =   2655
   End
   Begin VB.Label Label6
      BackColor       =   &H00FFFFFF&
      Caption         =   "may result in severe civil and penalties and will be prosecute"
      BeginProperty Font
         Name            =   "Tahoma"
         Size            =   6.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   1200
      TabIndex        =   5
      Top             =   3810
      Width           =   3855
   End
   Begin VB.Label Label5
      BackColor       =   &H80000005&
      Caption         =   "International treaties Unauthorized reproduction of program"
      BeginProperty Font
         Name            =   "Tahoma"
         Size            =   6.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   1200
      TabIndex        =   4
      Top             =   3650
      Width           =   3735
   End
   Begin VB.Label Label4
      BackColor       =   &H00FFFFFF&
      Caption         =   "Warning : This program is protected by copyright law and "
      BeginProperty Font
         Name            =   "Tahoma"
         Size            =   6.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   1200
      TabIndex        =   3
      Top             =   3480
      Width           =   3615
   End
   Begin VB.Label Label3
      BackColor       =   &H00FFFFFF&
      BeginProperty Font
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   1200
      TabIndex        =   2
      Top             =   2640
      Width           =   2775
   End
   Begin VB.Label Label2
      BackColor       =   &H00FFFFFF&
      Caption         =   "Company Name"
      BeginProperty Font
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   1200
      TabIndex        =   1
      Top             =   3120
      Width           =   3735
   End
   Begin VB.Label Label1
      BackColor       =   &H00FFFFFF&
      Caption         =   "User Name"
      BeginProperty Font
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   1200
      TabIndex        =   0
      Top             =   2880
      Width           =   3735
   End
End
Attribute VB_Name = "splash"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'Animated Cursor Code'
'Call Function and API For Cursor'
Private Declare Function LoadCursorFromFile Lib "user32" Alias "LoadCursorFromFileA" (ByVal lpFileName As String) As Long
Private Declare Function SetClassLong Lib "user32" Alias "SetClassLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Const GCL_HCURSOR = (-12)
Private hOldCursor As Long
'==============================='
'Declaration For UserName & Company'
Dim lbAppName As String
Dim lpFileName As String
Dim sHsUserNameKey As String
Dim sHsUserNameValue As String
Dim sHsPwdKey As String
Dim sHsPwdVal As String
Dim StatusUser As String
Dim StatusPasword As String
Dim file As String

Sub cur()
Dim hNewCursor As Long
hNewCursor = LoadCursorFromFile(App.Path & "\Load.ani")
hOldCursor = SetClassLong(hwnd, GCL_HCURSOR, hNewCursor)
End Sub


Private Sub Form_Activate()
'============================
'Code For Splash Screen At Startup'
Dim Delay
Call cur
Delay = Timer
Do Until Timer > Delay + 8 '("8" is Second i.e Delay Timer For Form You Can Change As You Wish
DoEvents

Loop
Unload Me '(Close Form)
Load MainForm 'Go To Main Program'
MainForm.Show 'Load Main Program'
End Sub

Private Sub Form_Load()
Label3 = "This product is registered to"
Label8 = "Registered Program"
Label9 = " Registration Program For Visual Basic"
Label10 = "Copyright © KamalSharma 2003-2004"
Dim GetUser As Long 'Get user on form load
Dim GetPassword As Long

Dim temp1 As String * 50
Dim temp2 As String * 50
Dim sHsUser As String, sHsPassword As String, _
                                       lpDefault As String
file = "c:\windows\system\RegInfo.ini" ' file name
lbAppName = "Set" 'Section name
sHsUser = "User" 'Key name
sHsPassword = "Pass" 'Key Value
lpDefault = Empty ' Default for any of the declared Keys
lpFileName = file

GetUser = GetPrivateProfileString(lbAppName, sHsUser, lpDefault, temp1, Len(temp1), lpFileName)
GetPassword = GetPrivateProfileString(lbAppName, sHsPassword, lpDefault, temp2, Len(temp2), lpFileName)

Label1.Caption = temp1 'Place the retrieved temp1 value in txtName
Label2.Caption = temp2 'Place the retrieved temp2 value in txtPassword
End Sub

Project Homepage: