How to get Assembly Infos when starting form Sub Main ?

  • Thread starter Thread starter Gilles LAMBERT
  • Start date Start date
G

Gilles LAMBERT

Hi,

The static class Application is fine to get Assembly infos when the
application starts form a form, but several properties like
ProductVersion, ProductName are no more accessible xhen it starts form a
Sub Main.

Is it possible to get this informations anyway ?

Thanks and best regards
Gilles
 
Hello,

Gilles LAMBERT said:
The static class Application is fine to get Assembly infos when the
application starts form a form, but several properties like
ProductVersion, ProductName are no more accessible xhen it starts form a
Sub Main.

Add a reference to System.Windows.Forms.dll and import the
System.Windows.Forms namespace.

Regards,
Herfried K. Wagner
 
Hi Herfried K. Wagner,

Thanks for your answer but this was done. Here is the exception i
receive :

Une exception non gérée du type 'System.NullReferenceException' s'est
produite dans system.windows.forms.dll

Informations supplémentaires : La référence d'objet n'est pas définie à
une instance d'un objet.

When i write :

MsgBox(Application.ProductName)
 
Back
Top