タイトル : 解決 投稿日 : 2005/03/04(Fri) 15:20 投稿者 : aki
[OSのVer]:Windows [VBのVer]:VB.NET > こんにちは、じゃんぬねっと です。 > > C# だけど、VB.NET に変換してみてくださーい。 > hhttp://jeanne.wankuma.com/tips/process/03-activewindow.html ありがとうございます! Dim hThisProcess As Process = System.Diagnostics.Process.GetCurrentProcess() Dim hProcesses As Process() = System.Diagnostics.Process.GetProcessesByName (hThisProcess.ProcessName) Dim iThisProcessId As Integer = hThisProcess.Id Dim hProcess As Process For Each hProcess In hProcesses If hProcess.Id <> iThisProcessId Then ShowWindow(hProcess.MainWindowHandle.ToInt32, 1) SetForegroundWindow(hProcess.MainWindowHandle.ToInt32) Return True End If Next で出来ました。 私のコードはいい加減なプロセスをアクティブにしてたんですね。 早々に応えていただきありがとうございました。 またよろしくお願いいたします。 |