Q %26 A - 如何將pictureBox 置於splitContainer 的最上層
我寫了一段code,在MouseButton_DoubleClick的事件之中,程式碼如下: Dim img As New PictureBox img.Image = My.Resources.picture img.Location = New System.Drawing.Point(200, 200) 環境消毒 img.Size = New System.Drawing.Size(200, 200) img.Visible = True img.TabStop = False img.SizeMode = PictureBoxSizeMode.StretchImage img.BorderStyle = BorderStyle.Fixed3D Me.Controls.Add(img)我有測試過程式是正常?除蟲i以將圖片顯現的,不過在windowForm中如果托拉了splitContainer用來作分割之後,在這個事件中所產生的圖片就會看不見了,所以我認為可能是splitContainer將圖片蓋住了,可是卻找不到如何將pictureBox置於最上層的方法。A
Dim MyPic As PictureBox Private Sub Button1_Click(ByVal sender As System.Object, By 玻璃清潔Val e As System.EventArgs) Handles Button1.Click MyPic = New PictureBox MyPic.Visible = True MyPic.Size = New Size(100, 100) MyPic.Location = New Point(10, 10)
MyPic.Image = Image.FromFile("C:\logo.gif") Me.SplitContainer1.Panel2.Controls.Add(MyPic)
駕訓班 >
沒有留言:
張貼留言