Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
CompanyName Property
Collapse the table of content
Expand the table of content

Control.CompanyName Property

Gets the name of the company or creator of the application containing the control.

[Visual Basic]
Public ReadOnly Property CompanyName As String
public string CompanyName {get;}
public: __property String* get_CompanyName();
public function get CompanyName() : String;

Property Value

The company name or creator of the application containing the control.


The CompanyName property is a read-only property. In order to change the value of this property, set the Company property value of the AssemblyCompanyAttribute. The following line of C# code sets the CompanyName property.

[assembly: AssemblyCompany("Microsoft")]
Note   It is strongly recommended that you provide the company name, product name, and product version. Providing this information enables the use of Windows Forms features such as Application.UserAppDataPath that make it easier to write applications that comply with the "Certified for Windows" program. For more information on the Certified for Windows program, see http://msdn.microsoft.com/certification.


[Visual Basic, C#, C++] The following example displays information about the application in a Label contained by a Form. This code assumes the CompanyName, ProductName and ProductVersion have been set.

[Visual Basic] 
Private Sub AboutDialog_Load(sender As Object, e As EventArgs) Handles MyBase.Load
   ' Display the application information in the label.
   Me.labelVersionInfo.Text = _
      Me.CompanyName + "  " + _
      Me.ProductName + "  Version: " + _
   End Sub

private void AboutDialog_Load(object sender, EventArgs e)
   // Display the application information in the label.
   this.labelVersionInfo.Text = 
      this.CompanyName + "  " + 
      this.ProductName + "  Version: " +

void AboutDialog_Load(Object* /*sender*/, EventArgs* /*e*/) {
   // Display the application information in the label.
   this->labelVersionInfo->Text =
      String::Format( "{0} {1} Version: {2}", this->CompanyName, this->ProductName, this->ProductVersion );

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Control Class | Control Members | System.Windows.Forms Namespace | AssemblyCompanyAttribute.Company | FileVersionInfo.CompanyName

© 2015 Microsoft