NSDProcessInfo メンバ

プロセス情報用。


●コンストラクタ

名前 説明
NSDProcessInfo NSDProcessInfoを初期化します。

●プロパティの一覧

名前 説明
WindowText ウィンドウのテキストを返します。
Path モジュールのパスを返します。
ProcessID プロセスIDを返します。

●NSDProcessInfoコンストラクタの説明

構文:Public Sub New( Text , Path , ID )

使用法:Dim Cls_Process As New NSDWinEnd.NSDProcess.NSDProcessInfo( Text , Path , ID )

引数:

 

名前 引数渡しの方法 説明
Text String 値渡し(ByVal) ウィンドウのテキストを渡します。
Path String 値渡し(ByVal) モジュールのパスを渡します。
ID IntPtr 値渡し(ByVal) プロセスIDを渡します。

使用例:

NSDProcessGetRunApplicationListメソッド内でのみ呼ばれるコンストラクタ。


●NSDProcessInfoプロパティの説明

名前:WindowText

構文:Public ReadOnly Property WindowText() As String

機能:ウィンドウのテキストを返します。

引数:なし。

値:String

値の説明:

ウィンドウのテキストを返します。

使用例:

Public Class Form1
     :

    ' 起動しているアプリケーションの表示.
    Private Sub Button1_Click( ByVal sender As System.Object, _
                               ByVal e As System.EventArgs _
                             ) Handles Button1.Click
        Try
            Dim Cls_Process As New NSDWinEnd.NSDProcess
            ' 起動しているアプリケーションのリストを取得します.
            Dim Cls_AppInfo() As NSDWinEnd.NSDProcess.NSDProcessInfo = _
                    Cls_Process.GetRunApplicationList()
            Dim Str_Msg As String = Nothing
            For Int_Loop As Integer = 0 To Cls_AppInfo.Length - 1
                Str_Msg = "ウィンドウテキスト : " & Cls_AppInfo(Int_Loop).WindowText & vbCrLf
                Str_Msg &= "モジュールパス : " & Cls_AppInfo(Int_Loop).Path & vbCrLf
                Str_Msg &= "プロセスID : " & Cls_AppInfo(Int_Loop).ProcessID.ToString

                MsgBox(Str_Msg)
            Next
        Finally
        End Try
    End Sub
End Class

 

名前:Path

構文:Public ReadOnly Property Path() As String

機能:モジュールのパスを返します。

引数:なし。

値:String

値の説明:

モジュールのパスを返します。

使用例:

Public Class Form1
     :

    ' 起動しているアプリケーションの表示.
    Private Sub Button1_Click( ByVal sender As System.Object, _
                               ByVal e As System.EventArgs _
                             ) Handles Button1.Click
        Try
            Dim Cls_Process As New NSDWinEnd.NSDProcess
            ' 起動しているアプリケーションのリストを取得します.
            Dim Cls_AppInfo() As NSDWinEnd.NSDProcess.NSDProcessInfo = _
                    Cls_Process.GetRunApplicationList()
            Dim Str_Msg As String = Nothing
            For Int_Loop As Integer = 0 To Cls_AppInfo.Length - 1
                Str_Msg = "ウィンドウテキスト : " & Cls_AppInfo(Int_Loop).WindowText & vbCrLf
                Str_Msg &= "モジュールパス : " & Cls_AppInfo(Int_Loop).Path & vbCrLf
                Str_Msg &= "プロセスID : " & Cls_AppInfo(Int_Loop).ProcessID.ToString

                MsgBox(Str_Msg)
            Next
        Finally
        End Try
    End Sub
End Class

 

名前:ProcessID

構文:Public ReadOnly Property ProcessID() As IntPtr

機能:プロセスIDを返します。

引数:なし。

値:IntPtr

値の説明:

プロセスIDを返します。

使用例:

Public Class Form1
     :

    ' 起動しているアプリケーションの表示.
    Private Sub Button1_Click( ByVal sender As System.Object, _
                               ByVal e As System.EventArgs _
                             ) Handles Button1.Click
        Try
            Dim Cls_Process As New NSDWinEnd.NSDProcess
            ' 起動しているアプリケーションのリストを取得します.
            Dim Cls_AppInfo() As NSDWinEnd.NSDProcess.NSDProcessInfo = _
                    Cls_Process.GetRunApplicationList()
            Dim Str_Msg As String = Nothing
            For Int_Loop As Integer = 0 To Cls_AppInfo.Length - 1
                Str_Msg = "ウィンドウテキスト : " & Cls_AppInfo(Int_Loop).WindowText & vbCrLf
                Str_Msg &= "モジュールパス : " & Cls_AppInfo(Int_Loop).Path & vbCrLf
                Str_Msg &= "プロセスID : " & Cls_AppInfo(Int_Loop).ProcessID.ToString

                MsgBox(Str_Msg)
            Next
        Finally
        End Try
    End Sub
End Class

Copyright (C) 2010-2012 Nihon System Developer Corp. All Rights Reserved.