引用來源
--
Imports System.Reflection
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim a As Assembly = Assembly.GetExecutingAssembly '取得目前組件
For Each t As Type In a.GetTypes '找尋組件內所有類別型態
If t.IsSubclassOf(GetType(Form)) Then '如果類別是繼承自Form的話
TextBox1.AppendText(t.ToString & vbNewLine) '列出該類別資訊
End If
Next
End Sub
End Class
沒有留言:
張貼留言