เปลี่ยน properties
ของ form ให้เป็น properties
แบบอื่น แต่ไม่เปลี่ยน properties ที่สำคัญ
เช่น
Owner,
Handle, OwnedForms, Parent,
HasChildren, Controls
·
ผมเขียนโค้ดแบบนี้ครับ แต่รู้สึกว่าไม่เวิร์ค
For
Each Propertry
In ForeForm.GetType.GetProperties()
Select
Case Propertry.Name
Case
"AeroBackgroundEnabled",
"FormBorderStyle",
"TransparencyKey",
"Parent",
"Owner",
"ShowInTaskbar",
"Handle",
"HasChildren",
"OwnedForms",
"Controls",
"Focused"
Continue For
End
Select
If Propertry.CanWrite
AndAlso Propertry.CanRead
Then
Propertry.SetValue(Me, Propertry.GetValue(ForeForm,
Nothing),
Nothing)
End
If
Next
ช่วยแนะนำด้วยครับ ใช้ภาษา
VB.net หรือ C#.net ก็ได้
Supa Sethasiripong [MSFT]
MSDN Community Support |
Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.