{"id":59,"date":"2010-03-17T10:31:05","date_gmt":"2010-03-17T10:31:05","guid":{"rendered":"https:\/\/ibex.tech\/visualcpp\/?p=59"},"modified":"2022-05-06T11:23:57","modified_gmt":"2022-05-06T10:23:57","slug":"fileversioninfo","status":"publish","type":"post","link":"https:\/\/ibex.tech\/visualcpp\/application-control\/fileversioninfo","title":{"rendered":"FileVersionInfo"},"content":{"rendered":"\n<p>You can read file version attributes of your applications exe or other files using this class.&nbsp; If you prefer to use file attributes for your application rather than assembly attributes (so they show up in the exe file properly in explorer etc), you can use this to read them in you application.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Reading Values (Application Version)<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>lblVersion-&gt;Text += Convert::ToString(System::Diagnostics::FileVersionInfo::GetVersionInfo(Application::ExecutablePath)-&gt;FileMajorPart);\nlblVersion-&gt;Text += \".\";\nlblVersion-&gt;Text += Convert::ToString(String::Format(\"{0:D2}\", System::Diagnostics::FileVersionInfo::GetVersionInfo(Application::ExecutablePath)-&gt;FileMinorPart));\n\nlblCopyright-&gt;Text = System::Diagnostics::FileVersionInfo::GetVersionInfo(Application::ExecutablePath)-&gt;LegalCopyright;\n\nlblApName-&gt;Text = System::Diagnostics::FileVersionInfo::GetVersionInfo(Application::ExecutablePath)-&gt;ProductName;<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Creating Class Object<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>Diagnostics::FileVersionInfo ^myFileVersionInfo = System::Diagnostics::FileVersionInfo::GetVersionInfo(Application::ExecutablePath);\nlblCopyright-&gt;Text = myFileVersionInfo-&gt;LegalCopyright;<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>You can read file version attributes of your applications exe or other files using this class.&nbsp; If you prefer to use file attributes for your application rather than assembly attributes (so they show up in the exe file properly in explorer etc), you can use this to read them in you application. Reading Values (Application [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-59","post","type-post","status-publish","format-standard","hentry","category-application-control"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/posts\/59","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/comments?post=59"}],"version-history":[{"count":7,"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/posts\/59\/revisions"}],"predecessor-version":[{"id":1637,"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/posts\/59\/revisions\/1637"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/media?parent=59"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/categories?post=59"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/tags?post=59"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}