By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,515 Members | 1,033 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,515 IT Pros & Developers. It's quick & easy.

system tray help

P: n/a
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.GetProcessesByNa me( _
System.Diagnostics.Process.GetCurrentProcess.Proce ssName)) > 0
Me.Text = Me.Text & "X"
Dim Handle As IntPtr = FindWindow(Nothing, SearchText)
ShowWindow(Handle, SW_RESTORE)
End If

end function

Nov 21 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
Perhaps this link will help:

Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.