且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在运行时创建图片盒

更新时间:2023-12-06 15:44:10

从Controls数组中删除它,并在末尾重新插入它:
Remove it from the Controls array and reinsert it at the end:
Controls.Remove(myPictureBox)
Controls.Add(myPictureBox)

最后添加的对象将位于其他对象之上.
或者,将它们按所需顺序排序,然后按该顺序一次将它们全部添加.
请记住,您也可以使用SQL ORDER BY子句来选择从数据库返回记录的顺序.

The last added object will be on top of the others.
Alternatively, sort them into the order you do want, and add them all at once in that order.
Remember that you can use the SQL ORDER BY clause to select the order in which records are returned from your DB as well.