Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
VB.NETアプリのアクティブな要素がテキスト ボックスかどうかを検出するにはどうすればよいですか?
VB.NET
Me.ActiveControlその後?
Me.ActiveControl
別の方法は
If Me.ActiveControl.GetType() Is GetType(System.Windows.Forms.TextBox) Then ' do stuff End If
使用できますTypeOf:
TypeOf
Dim isATextBox As Boolean = TypeOf Me.ActiveControl Is TextBox