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 / articles / vbbultn / source / vervrfy2.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1994-03-29  |  4.2 KB  |  128 lines

  1. VERSION 2.00
  2. Begin Form VerVrfy2 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "Version Verify"
  6.    ClientHeight    =   4875
  7.    ClientLeft      =   855
  8.    ClientTop       =   960
  9.    ClientWidth     =   6165
  10.    Height          =   5280
  11.    Icon            =   VERVRFY2.FRX:0000
  12.    Left            =   795
  13.    LinkTopic       =   "Form1"
  14.    MaxButton       =   0   'False
  15.    ScaleHeight     =   4875
  16.    ScaleWidth      =   6165
  17.    Top             =   615
  18.    Width           =   6285
  19.    Begin CommandButton ExitBut 
  20.       Caption         =   "Exit"
  21.       Height          =   375
  22.       Left            =   4830
  23.       TabIndex        =   4
  24.       Top             =   1140
  25.       Width           =   1275
  26.    End
  27.    Begin TextBox DetailText 
  28.       BackColor       =   &H00C0C0C0&
  29.       Height          =   2895
  30.       Left            =   120
  31.       MultiLine       =   -1  'True
  32.       ScrollBars      =   2  'Vertical
  33.       TabIndex        =   3
  34.       Top             =   1890
  35.       Width           =   5955
  36.    End
  37.    Begin ListBox ConflictListBox 
  38.       Height          =   1005
  39.       Left            =   120
  40.       TabIndex        =   1
  41.       Top             =   480
  42.       Width           =   4005
  43.    End
  44.    Begin VersionStamp VerStamp1 
  45.       exeComments     =   VERVRFY2.FRX:0302
  46.       FileVersion     =   VERVRFY2.FRX:03F8
  47.       Left            =   5610
  48.       SelectFiles     =   VERVRFY2.FRX:042C
  49.       Slave           =   -1  'True
  50.       Top             =   630
  51.    End
  52.    Begin Label Label2 
  53.       BackColor       =   &H00C0C0C0&
  54.       Caption         =   "Detail description of incompatibilities"
  55.       Height          =   195
  56.       Left            =   120
  57.       TabIndex        =   2
  58.       Top             =   1590
  59.       Width           =   5955
  60.    End
  61.    Begin Label Label1 
  62.       BackColor       =   &H00C0C0C0&
  63.       Caption         =   "&Incompatible Files"
  64.       Height          =   195
  65.       Left            =   120
  66.       TabIndex        =   0
  67.       Top             =   180
  68.       Width           =   1575
  69.    End
  70. Option Explicit
  71. Dim ListBoxTabs%(3)
  72. Dim TextBoxTabs%(3)
  73. Sub ConflictListBox_Click ()
  74. Dim index%
  75. Dim tstr$
  76.     'get index to selected list item
  77.     index% = ConflictListBox.ListIndex
  78.     If index% = -1 Then Exit Sub
  79.     index% = index% + 1 'index to array begins at 1
  80.     ' Get more information about each conflict.
  81.     tstr$ = GetDetailConflictInfo(index%)
  82.     ' Place detail information about each conflict in a text box.
  83.     DetailText.Text = tstr$
  84. End Sub
  85. Sub DetailText_KeyPress (KeyAscii As Integer)
  86.     KeyAscii = 0
  87. End Sub
  88. Sub ExitBut_Click ()
  89.     Unload Me
  90. End Sub
  91. Sub Form_Load ()
  92.     NL = Chr$(13) & Chr$(10)
  93.     TB = Chr$(9)
  94.     ListBoxTabs%(0) = 16 * 4
  95.     ListBoxTabs%(1) = ListBoxTabs%(0) + 16 * 4
  96.     ListBoxTabs%(2) = ListBoxTabs%(1) + 16 * 4
  97.     TextBoxTabs%(0) = 22 * 4
  98.     TextBoxTabs%(1) = TextBoxTabs%(0) + 22 * 4
  99.     TextBoxTabs%(2) = TextBoxTabs%(1) + 22 * 4
  100.     ' Handle the monochrome case by going black on white
  101.     If GetColorCount(Me) = 2 Then
  102.         BackColor = QBColor(15)
  103.         DetailText.BackColor = BackColor
  104.     End If
  105.     StartVerify VerStamp1
  106.     FillConflictFileListBox False, ConflictListBox
  107. End Sub
  108. Sub Form_Resize ()
  109. Dim dl&
  110.     ' Set the tab stops in the list box
  111.     dl& = SendMessage(ConflictListBox.hWnd, LB_SETTABSTOPS, 3, ListBoxTabs%(0))
  112.     ' Set identical tab stops in the text box
  113.     dl& = SendMessage(DetailText.hWnd, EM_SETTABSTOPS, 3, TextBoxTabs%(0))
  114. End Sub
  115. Sub VerStamp1_EnumComplete ()
  116.     LogEnumComplete VerStamp1
  117. End Sub
  118. ' This event is triggered for each file that contained
  119. ' a conflict with the embedded file.
  120. Sub VerStamp1_FileConflict (ReferenceFile As String, FoundFile As String, Flags As Long, StopVerify As Integer)
  121.     LogFileConflict ReferenceFile, FoundFile, Flags, StopVerify, VerStamp1
  122. End Sub
  123. Sub VerStamp1_FileScan (ReferenceFile As String, VerifyFlags As Long, StopScan As Integer)
  124.     'Since all we need to do is make sure at least one file was found
  125.     '(which tells us this EXE has embedded information), we can halt the scan.
  126.     StopFileScan ReferenceFile, VerifyFlags, StopScan
  127. End Sub
  128.