473,382 Members | 1,329 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,382 software developers and data experts.

running one application at a time

Blank
hi there,

I just want to explain my problem. There is an application which is coded by
me running. It is an vb.net application having user controls windows forms
and something like visual components. Also i can send some command line
options from the command line

for example >> C:\xxx.exe -a

i can run this application without command line options also, however every
call of the xxx.exe create a seperate windows form and display it on the
desktop. I want to run this application many sequantial times with command
line options without creating many windows form but new command line options
process...

I mean

xxx.exe -a "Something"

while previous one is running

xxx.exe -a "Something Else"

will do something else...

xxx.exe has list box... first run is add the "Something" text into the
listbox and while it is running, the second run is add the "Something Else"
text into the same listbox under the "Something" text.

how can i success this?
Nov 20 '05 #1
3 1599
Hi Freak,

Here some links for that

http://msdn.microsoft.com/library/de...ClassTopic.asp

http://msdn.microsoft.com/library/de...starttopic.asp

Single instance
http://msdn.microsoft.com/library/de...eaworapps1.asp

German
<URL:http://dotnet.mvps.org/dotnet/code/application/>
-> "Nur eine Instanz der Anwendung zulassen"

I hope this helps a little bit?

Cor
I just want to explain my problem. There is an application which is coded by me running. It is an vb.net application having user controls windows forms
and something like visual components. Also i can send some command line
options from the command line

for example >> C:\xxx.exe -a

i can run this application without command line options also, however every call of the xxx.exe create a seperate windows form and display it on the
desktop. I want to run this application many sequantial times with command
line options without creating many windows form but new command line options process...

I mean

xxx.exe -a "Something"

while previous one is running

xxx.exe -a "Something Else"

will do something else...

xxx.exe has list box... first run is add the "Something" text into the
listbox and while it is running, the second run is add the "Something Else" text into the same listbox under the "Something" text.

how can i success this?

Nov 20 '05 #2
Thanks for those links,
they don't solve my problem completely but give me some different ideas...
"Cor Ligthert" <no**********@planet.nl> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Hi Freak,

Here some links for that

http://msdn.microsoft.com/library/de...ClassTopic.asp
http://msdn.microsoft.com/library/de...starttopic.asp
Single instance
http://msdn.microsoft.com/library/de...eaworapps1.asp
German
<URL:http://dotnet.mvps.org/dotnet/code/application/>
-> "Nur eine Instanz der Anwendung zulassen"

I hope this helps a little bit?

Cor
I just want to explain my problem. There is an application which is coded
by
me running. It is an vb.net application having user controls windows

forms and something like visual components. Also i can send some command line
options from the command line

for example >> C:\xxx.exe -a

i can run this application without command line options also, however

every
call of the xxx.exe create a seperate windows form and display it on the
desktop. I want to run this application many sequantial times with command line options without creating many windows form but new command line

options
process...

I mean

xxx.exe -a "Something"

while previous one is running

xxx.exe -a "Something Else"

will do something else...

xxx.exe has list box... first run is add the "Something" text into the
listbox and while it is running, the second run is add the "Something

Else"
text into the same listbox under the "Something" text.

how can i success this?


Nov 20 '05 #3
Hi,

Use a mutex. Start the program from sub main

Public Sub main()
Dim owned As Boolean
Dim mut As New System.Threading.Mutex(True, "xvcjsdf67AS124#$3",
owned)

If owned Then
Application.Run(New Form1)
mut.ReleaseMutex()
Else
MessageBox.Show("A previous instance is already running")
End If
End Sub

Ken
--------------------------
"° ^F®êâK^ °" <fr*******@maxfree-fun.net> wrote in message
news:uU***************@TK2MSFTNGP09.phx.gbl...
Blank
hi there,

I just want to explain my problem. There is an application which is coded
by
me running. It is an vb.net application having user controls windows forms
and something like visual components. Also i can send some command line
options from the command line

for example >> C:\xxx.exe -a

i can run this application without command line options also, however
every
call of the xxx.exe create a seperate windows form and display it on the
desktop. I want to run this application many sequantial times with command
line options without creating many windows form but new command line
options
process...

I mean

xxx.exe -a "Something"

while previous one is running

xxx.exe -a "Something Else"

will do something else...

xxx.exe has list box... first run is add the "Something" text into the
listbox and while it is running, the second run is add the "Something
Else"
text into the same listbox under the "Something" text.

how can i success this?

Nov 20 '05 #4

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

Similar topics

13
by: BK | last post by:
Can someone point me to a code sample that illustrates executing long running tasks (asynchronous) from a web application in ASP.NET? I assume that Web Services might come into play at some point,...
8
by: nickdu | last post by:
I'm trying to isolate "applications" into their own application domain within a single process. I've quoted applications because it's a logical representation of an application. Basically it...
6
by: Grace | last post by:
Hello, I write a Web Application: its UI has a DataGrid controller. The web application gets huge data from SQL Server, then shows the result after processing these data. It needs much time to...
0
by: Rusty Shackleford | last post by:
I am having trouble getting my ASP.Net applications and sessions to stay running. At first, I thought it was my lack of understanding of ASP.Net, or the fact that I am using Anonymous...
6
by: Alex G. | last post by:
some one knows how to check if my app. (Example ap1.exe) is running (because i don't want than it run twice at the same time in the same machine) somebody knows like verifying if my application...
0
by: Uma | last post by:
Dear all, I have a problem while running a smart client application which was installed through CD-ROM. After installing the smart client setup the application is running properly. When running...
4
by: news.citenet.net | last post by:
I keep getting the following error message after my web site running 2 or 3 days I share one folder with about 200 domain names Any one can help? ...
4
by: Jeremy S. | last post by:
We're in the process of writing a new Windows Forms app and the desktop support folks want for it to be run from a network share. I know it's possible (i.e., just have the framework on the clients...
3
by: Anil Kumar Sharma | last post by:
Hello, I am working on C# using vs.net 2003. I have faced two interesting problems. 1. Dynamically setting Default Button: I created a form and used it in various contexts. On basis of the...
1
by: daniel_xi | last post by:
Hi all, I am running a VS 2003 .NET project on my client machine (Win 2000 SP4, ..NET framework 1.1), running an ASP.NET application on a remote web server (Win 2000 Server, IIS 6.0, .NET...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.