473,386 Members | 1,867 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

system tray help

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
Then
Me.Text = Me.Text & "X"
Dim Handle As IntPtr = FindWindow(Nothing, SearchText)
ShowWindow(Handle, SW_RESTORE)
End
End If

end function

Nov 21 '05 #1
1 1274
Perhaps this link will help:

http://www.bobpowell.net/singleinstance.htm

Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: none | last post by:
Hello all, I wrote a shell program a few years ago in VB6 that needs to be modified. The problem I have is this: The SysAdmin uses this shell in place of Explorer, so there is no taskbar. When...
5
by: BJ | last post by:
I am trying to add my application to the system tray. I am not using the built in control becuase of the limitation that you can not use the balloon tool tip feature. I have done this succesfully...
4
by: Tom | last post by:
Hello, System tray icon informs users that the apps is running in the background. However, there are instances that the app might crash and after that the app icon in the system tray is still...
10
by: Crouchie1998 | last post by:
Hello To All You Real Programmers Out There!! There is an application called: "Tray It" Webpage: ---------- http://www.teamcti.com/trayit/trayit.htm Direct Download:
5
by: scottt | last post by:
I asked a question along a similar line about a week ago and didn't get any replies. Let me try to ask the quetion again a little bit different to see if I can get some help on this problem. Is...
5
by: bipi | last post by:
Dear everyone, In my application, I kill process by: private bool KillProcess(String processName) { bool result = false; Process process = Process.GetProcessesByName(processName); for (int...
2
by: ericlangland | last post by:
Hi, I have a small managed code application (windows forms) that executes on startup and immidiatly minimizes to the system tray. It launches and shows the form when I double click it's small...
3
by: =?Utf-8?B?QXNhZg==?= | last post by:
Hi, I have created a System Tray application using C# for .NET 2.0. My PC will not shut down or make a restart if my System Tray application is working at the Tray. Only after I end the process...
3
by: Patrick Dugan | last post by:
I am using VS2005 (vb) and I have a program that starts when Windows boots up. Occasionally the icon that should appear in the system tray does not show up. The program is still running in memory...
3
by: Usman Jamil | last post by:
Hi I've a windows application that does a lengthy backup process. While the process is going on, I need to show a progress bar inside system tray or just above the system tray. Can someone...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.