home *** CD-ROM | disk | FTP | other *** search
/ Dan Appleman's Visual Bas…s Guide to the Win32 API / Dan.Applmans.Visual.Basic.5.0.Programmers.Guide.To.The.Win32.API.1997.Ziff-Davis.Press.CD / VB5PG32.mdf / desaware / demo32 / vs5demo / versamp.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-05-06  |  4.5 KB  |  135 lines

  1. VERSION 4.00
  2. Begin VB.Form VersionStamperSample 
  3.    BorderStyle     =   1  'Fixed Single
  4.    Caption         =   "VersionStamper Sample"
  5.    ClientHeight    =   5460
  6.    ClientLeft      =   2160
  7.    ClientTop       =   1455
  8.    ClientWidth     =   4560
  9.    Height          =   5865
  10.    Left            =   2100
  11.    LinkTopic       =   "Form1"
  12.    MaxButton       =   0   'False
  13.    MinButton       =   0   'False
  14.    ScaleHeight     =   5460
  15.    ScaleWidth      =   4560
  16.    Top             =   1110
  17.    Width           =   4680
  18.    Begin VB.CommandButton Command2 
  19.       Caption         =   "&Verify Files"
  20.       Height          =   525
  21.       Left            =   120
  22.       TabIndex        =   5
  23.       Top             =   4890
  24.       Width           =   1245
  25.    End
  26.    Begin VB.CommandButton Command1 
  27.       Caption         =   "E&xit"
  28.       Height          =   525
  29.       Left            =   3210
  30.       TabIndex        =   4
  31.       Top             =   4890
  32.       Width           =   1245
  33.    End
  34.    Begin VB.Label Label2 
  35.       Caption         =   "You may run this example only within the Visual Basic environment."
  36.       BeginProperty Font 
  37.          name            =   "MS Sans Serif"
  38.          charset         =   0
  39.          weight          =   400
  40.          size            =   9.75
  41.          underline       =   0   'False
  42.          italic          =   0   'False
  43.          strikethrough   =   0   'False
  44.       EndProperty
  45.       ForeColor       =   &H000000FF&
  46.       Height          =   495
  47.       Left            =   660
  48.       TabIndex        =   7
  49.       Top             =   4320
  50.       Width           =   3285
  51.    End
  52.    Begin VB.Label Label1 
  53.       Caption         =   "This sample project uses some invalid file version, date, and size in order to show the conflict reports."
  54.       Height          =   405
  55.       Index           =   4
  56.       Left            =   150
  57.       TabIndex        =   6
  58.       Top             =   3810
  59.       Width           =   4275
  60.    End
  61.    Begin VB.Label Label1 
  62.       Caption         =   $"VerSamp.frx":0000
  63.       Height          =   1245
  64.       Index           =   3
  65.       Left            =   150
  66.       TabIndex        =   3
  67.       Top             =   2460
  68.       Width           =   4275
  69.    End
  70.    Begin VB.Label Label1 
  71.       Caption         =   $"VerSamp.frx":0136
  72.       Height          =   1005
  73.       Index           =   2
  74.       Left            =   150
  75.       TabIndex        =   2
  76.       Top             =   1350
  77.       Width           =   4275
  78.    End
  79.    Begin VerstampLibDemoCtl.VersionStampDemo VersionStampDemo1 
  80.       Left            =   2040
  81.       Top             =   4920
  82.       _Version        =   262144
  83.       _ExtentX        =   847
  84.       _ExtentY        =   847
  85.       _StockProps     =   0
  86.       SelectFiles     =   "VerSamp.frx":024E
  87.       SelectFiles32   =   "VerSamp.frx":0264
  88.       VerifyMode      =   0
  89.       ReadPropErrors  =   0   'False
  90.       Slave           =   0   'False
  91.       Delay           =   0   'False
  92.       FileFilterExt   =   ""
  93.       OtherPaths      =   ""
  94.       PathFilter      =   6
  95.       FileFilter      =   3
  96.    End
  97.    Begin VB.Label Label1 
  98.       Caption         =   "You start by adding the VersionStamper demo control to your project, then add the VerVrfy.bas, VerVrfy2.frm and English.bas files."
  99.       Height          =   615
  100.       Index           =   1
  101.       Left            =   150
  102.       TabIndex        =   1
  103.       Top             =   630
  104.       Width           =   4275
  105.    End
  106.    Begin VB.Label Label1 
  107.       Caption         =   "Here is an example on how to use the VersionStamper demo control to check for file conflicts on the current system."
  108.       Height          =   435
  109.       Index           =   0
  110.       Left            =   150
  111.       TabIndex        =   0
  112.       Top             =   90
  113.       Width           =   4275
  114.    End
  115. Attribute VB_Name = "VersionStamperSample"
  116. Attribute VB_Creatable = False
  117. Attribute VB_Exposed = False
  118. Option Explicit
  119. Private Sub Command1_Click()
  120. Unload Me
  121. End Sub
  122. Private Sub Command2_Click()
  123.     ' Enter name of your custom application here
  124.     FileToCheck$ = App.Path
  125.     ' We append a backslash only if one isn't present - just in case project is in root
  126.     If Right$(FileToCheck$, 1) <> "\" Then FileToCheck$ = FileToCheck$ & "\"
  127.     FileToCheck$ = FileToCheck$ & "VerSamp.exe"
  128.     Load VerVrfy2   ' This starts the verification
  129.     If ConflictFilesFound% Then
  130.         VerVrfy2.Show 1
  131.     Else
  132.         Unload VerVrfy2
  133.     End If
  134. End Sub
  135.