>>208 ToStringでわざわざ文字列にする必要はないと思われる。 逆にToInt32()でInteger型にして比較するほうが妥当だと思われるが。 まあ、IntPtr型とInteger型(UInt32型)は直接比較することもできる。 Dim pi As New System.Diagnostics.ProcessStartInfo pi.FileName = "c:\windows\notepad.exe" Dim hProcess As IntPtr = System.Diagnostics.Process.Start(pi).Handle Dim pHnd As UInt32 '取得したプロセスハンドル If hProcess = pHnd Then '判断 MsgBox("メモ帳です") Else MsgBox("メモ帳じゃない") End If