|
■No32597 (tanaka さん) に返信 > WindowsXP+VB.NET2005でWindowsアプリケーションを作成しています。
では何故、 > 分類:[ASP.NET (VB)] になっているのでしょう? (^^;
> タスクバーのボタンの情報を取得するにはどうすればよいのでしょうか。 ボタン名だけで良ければ:
Public Class Form1 Private Structure PointAPI Public X As Integer Public Y As Integer Shared Widening Operator CType(ByVal p As Point) As PointAPI Dim r As PointAPI r.X = p.X r.Y = p.Y Return r End Operator End Structure
Private Declare Unicode Function AccessibleObjectFromPoint Lib "Oleacc" _ (ByVal xy As PointAPI, _ ByRef ppAcc As Accessibility.IAccessible, _ ByRef pvarChild As Object) As Integer
Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As EventArgs) Handles Timer1.Tick Dim acc As Object = Nothing Dim child As Object = Nothing
AccessibleObjectFromPoint(Cursor.Position, acc, child) Dim a As Accessibility.IAccessible = TryCast(acc, Accessibility.IAccessible) If a IsNot Nothing Then Label1.Text = a.accName(child) System.Runtime.InteropServices.Marshal.ReleaseComObject(a) Else Label1.Text = "" End If End Sub End Class
|