S
sonali_reddy123
Re - systray help
This is my code for function which i have written in modulemain() and
if multiple instances of an application are detected then after
execution of following code to restore the
previous instance my application should exit.
But in this case the FindWindow method returns value 0 so that no
instance is getting restored.
(Previous instance of my application is in minimized in systray).
Public Function MultipleInstancesRunning1() As Boolean
If UBound(System.Diagnostics.Process.GetProcessesByName( _
System.Diagnostics.Process.GetCurrentProcess.ProcessName)) > 0
Then
Me.Text = Me.Text & "X"
Dim Handle As IntPtr = FindWindow(Nothing, SearchText)
ShowWindow(Handle, SW_RESTORE)
End
End If
end function
This is my code for function which i have written in modulemain() and
if multiple instances of an application are detected then after
execution of following code to restore the
previous instance my application should exit.
But in this case the FindWindow method returns value 0 so that no
instance is getting restored.
(Previous instance of my application is in minimized in systray).
Public Function MultipleInstancesRunning1() As Boolean
If UBound(System.Diagnostics.Process.GetProcessesByName( _
System.Diagnostics.Process.GetCurrentProcess.ProcessName)) > 0
Then
Me.Text = Me.Text & "X"
Dim Handle As IntPtr = FindWindow(Nothing, SearchText)
ShowWindow(Handle, SW_RESTORE)
End
End If
end function