none
VB2010でpanalの前面にlabelを置くには? RRS feed

  • 質問

  • 以下のコードを書いたのですがやりたいことは
    
    panelの上にlabelを表示させたいのですが
    
    panelの方が前面にきて、label.textが隠れてしまいます
    
    対処法を教えてください
    
    Public Class Form1
      Private panel As System.Windows.Forms.Panel
      Private label As System.Windows.Forms.Label
    
      Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Me.panel = New System.Windows.Forms.Panel
        Me.panel.BackColor = Color.CadetBlue
        Me.panel.Location = New Point(0, 0)
        Me.panel.Dock = DockStyle.Top
        Me.panel.Size = New Size(100, 100)
        Me.Controls.Add(Me.panel)
        Me.label = New System.Windows.Forms.Label
        Me.label.Text = "aaa"
    
        Me.label.Location = New Point(0, 0)
        Me.label.Size = New Size(100, 10)
        Me.Controls.Add(Me.label)
    
    
    
    
      End Sub
    End Class
    
    2011年4月7日 5:30

回答

すべての返信