From: Patrice Dargenton on
Hello, I am looking for a trick to read the file version of an ocx in
dotnet, the file version that is showed in the file explorer : I want to be
sure that the version of the registered ocx is correct before continuing to
run a software which depends on the ocx. Does anyone has a solution ?
Thanks.

Example in the Windows file explorer :
File version : 2.0.0.16

VB6 ocx version :
MajorVer=2
MinorVer=0
RevisionVer=16

-------------------------------------------------------
Patrice Dargenton
patrice.dargenton(a)free.fr
http://patrice.dargenton.free.fr/index.html
-------------------------------------------------------



From: Family Tree Mike on


"Patrice Dargenton" wrote:

> Hello, I am looking for a trick to read the file version of an ocx in
> dotnet, the file version that is showed in the file explorer : I want to be
> sure that the version of the registered ocx is correct before continuing to
> run a software which depends on the ocx. Does anyone has a solution ?
> Thanks.
>
> Example in the Windows file explorer :
> File version : 2.0.0.16
>
> VB6 ocx version :
> MajorVer=2
> MinorVer=0
> RevisionVer=16
>
> -------------------------------------------------------
> Patrice Dargenton
> patrice.dargenton(a)free.fr
> http://patrice.dargenton.free.fr/index.html
> -------------------------------------------------------
>
>
>
> .
>

To get the version information on a file, use the FileVersionInfo class.
The class documentation is available here:
http://msdn.microsoft.com/en-us/library/system.diagnostics.fileversioninfo.aspx

Mike