Control.CompanyName 속성

정의

컨트롤을 포함하고 있는 애플리케이션의 회사 이름이나 작성자를 가져옵니다.

public:
 property System::String ^ CompanyName { System::String ^ get(); };
[System.ComponentModel.Browsable(false)]
public string CompanyName { get; }
[<System.ComponentModel.Browsable(false)>]
member this.CompanyName : string
Public ReadOnly Property CompanyName As String

속성 값

String

컨트롤을 포함하고 있는 애플리케이션의 회사 이름이나 작성자입니다.

특성

예제

애플리케이션에 대 한 정보를 표시 하는 다음 코드 예제는 Label 에 포함 된를 Form입니다. This example requires that the CompanyName, ProductName and ProductVersion have been set.

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 );
}
private void AboutDialog_Load(object sender, EventArgs e)
{
   // Display the application information in the label.
   this.labelVersionInfo.Text = 
      this.CompanyName + "  " + 
      this.ProductName + "  Version: " +
      this.ProductVersion;  
}
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: " + _
      Me.ProductVersion
   End Sub

설명

CompanyName 속성은 읽기 전용 속성입니다. 이 속성의 값을 변경하려면 .의 AssemblyCompanyAttribute속성 값을 설정합니다Company. 다음 C# 코드 줄은 속성을 설정합니다 CompanyName .

[assembly: AssemblyCompany("Microsoft")]  

참고

앱의 회사 이름, 제품 이름 및 제품 버전을 제공하는 것이 좋습니다.

적용 대상

추가 정보