VB.NET質問スレ (Part6) at TECH
VB.NET質問スレ (Part6) - 暇つぶし2ch822:デフォルトの名無しさん
04/09/10 15:49:41
>>818
Public Function FindControl2(ByVal ctl As Control, ByVal name As String) As Control


Dim myPropertyInfo As System.Reflection.PropertyInfo

Dim myObject As Object


myPropertyInfo = ctl.GetType().GetProperty(name _

, Reflection.BindingFlags.Instance _

Or Reflection.BindingFlags.NonPublic)


If Not myPropertyInfo Is Nothing Then


myObject = myPropertyInfo.GetValue(ctl, Nothing)

Return CType(myObject, Control)

End If

Return Nothing

End Function
for i as int32 = 0 to 10
findcontrol2(me,"textBox" & cstr( i) ).text="aheahe"
next


次ページ
続きを表示
1を表示
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch