Skip to content
Home > Programming > pal 9.4 send text > Reply To: pal 9.4 send text

Reply To: pal 9.4 send text

#187638
autopilot
Member

i have started using properties to set pal version variables. The attached project is a VB 2005 project.

it uses System.Diagnostics.FileVersionInfo to read the file version of the paltalk.exe.

Private _PalMajorVer As Integer
Public ReadOnly Property PalMajorVer() As Integer
Get
If _PalMajorVer = 0 Then
Try
If mdlPalInfo.PalPath "Not Found" Then
'This reads the file version information
' Paltalk calls this the Application version
' if you look in the About Pal window
Dim VersionInfo As System.Diagnostics.FileVersionInfo = System.Diagnostics.FileVersionInfo.GetVersionInfo(mdlPalInfo.PalPath & "paltalk.exe")
_PalMajorVer = VersionInfo.ProductMajorPart
_PalMinorVer = VersionInfo.ProductMinorPart
Else
_PalMajorVer = 0
End If
Catch
_PalMajorVer = 0
End Try
End If
Return _PalMajorVer
End Get
End Property

Private _PalMinorVer As Integer
Public ReadOnly Property PalMinorVer() As Integer
Get
If _PalMinorVer = 0 Then
Try
If mdlPalInfo.PalPath "Not Found" Then
'This reads the file version information
' Paltalk calls this the Application version
' if you look in the About Pal window
Dim VersionInfo As System.Diagnostics.FileVersionInfo = System.Diagnostics.FileVersionInfo.GetVersionInfo(mdlPalInfo.PalPath & "paltalk.exe")
_PalMinorVer = VersionInfo.ProductMinorPart
Else
_PalMinorVer = 0
End If
Catch
_PalMinorVer = 0
End Try
End If
Return _PalMinorVer
End Get
End Property