Proper Way To Launch Multiple Processes/

Jul 12, 2010

I have a quenstion to discus: I'm using Process.Start() and somettimes it's not worked properly. I meanin start application instantly or with random delays, even with hang's. So, as i wrote in title, there is a some proper way to launch another aplication?

I'm trying to write a some sort of launcher for user specific application based on createble profiles. In each profile user can set a file name (*.exe) with must be launched one or several times.[code]....

View 8 Replies


ADVERTISEMENT

Launch A New App And Remove The Calling App From Any Open Processes?

Apr 8, 2011

I am writing an updater for our application and having an issue overwriting the files. Here is a long drawn out example. Test.exe is our main app and update.exe is our updater application. Test.exe needs to launch update.exe and then close test.exe. Update.exe will download the new updates from our website to a temp directory and then copy in the new updates. The problem I have is when Test.exe has an update and I try to copy in the new file it says it can't because test.exe is still in use. I "believe" this happens because test.exe is still running in the appdomain because update.exe was launched from test.exe before I closed that app.

View 1 Replies

Multiple Processes With Same Name?

Apr 29, 2010

I have a need to search for a specific process in task manager and attach (dock) my application to the window for that process. I have this working just fine. The problem I'm having is that sometimes this process may be running more than once (for example: running two Internet Explorers would put two iexplore.exe entries in Task Manager).

Is there a way to get the one that was opened first? I'm not sure how they get "sorted" in the Process list, but currently I am retrieving the first occurrence of the process and docking to it, but I'm finding that it isn't always the correct one. How can I make it always dock to the process entry that was opened first?

[Code]...

View 14 Replies

Monitoring Que With Multiple Processes

May 21, 2010

We recently have one problem started where we have two processes monitor the same queue, but the diff b/w both is, one does the PEEK only and the other process it as soon as the message arrives (event driven). Do you think that pointing these 2 processes to the same que cause any problems OR are there something special sync things we need to do?

View 6 Replies

.net - Open A File From Multiple Processes?

Oct 6, 2010

Basically, I'm trying to get a program to behave in the following way:First instance of the program opens up on PC1, opens a file for Read/Write access and then acts as the master program, doing a bunch of work on some other files I don't want a whole bunch of users accessing at once.Second instance of the program starts up, tries to open the file for Read/Write access, fails, enters Slave mode, opens the file for Read access, and periodically reads the status of the other files from this file.

That's the plan, anyway. If anyone can suggest a better way to handle the master/slave decision-making.Anyway, as a lead-up to implementation, I've got two instances of Visual Studio open. One is running a project called "GetFile", the other is running a project called "TryGetFile"."GetFile" has a Private myStream As IO.FileStream object and opens the test file using this line:

myStream = IO.File.Open("\[network path] est.txt", IO.FileMode.OpenOrCreate,
IO.FileAccess.ReadWrite, IO.FileShare.ReadWrite)

This works fine and, as far as I can tell, should leave this file accessible for further Read/Write access by any other process, which is fine for this stage of the testing."TryGetFile" also has a Private myStream As IO.FileStream object, but it attempts the following open code:

myStream = IO.File.Open("\[network path] est.txt", IO.FileMode.Open,
IO.FileAccess.Read, IO.FileShare.Read)

This doesn't work at all. I get an IOException, which reports that test.txt is opened by another process and I'm not allowed to play with it.Basically, I don't see what the problem is; I don't think "TryGetFile" is asking for any file access which "GetFile" forbids it from having. As far as I can see, "GetFile" shouldn't be forbidding any kind of access at all...

[code]....

View 3 Replies

VS 2010 Check Multiple Processes?

Oct 16, 2011

how to check if one process is running but how do i check multiple processes running in the same check

PHP

Dim check As Process() = Process.GetProcessesByName("Steam")
If check.Length > 0 Then
For Each process As Process In check

[code]....

View 4 Replies

Kill Multiple Processes By Clicking Button?

Dec 2, 2008

I do computer repair for my local store and I have been noticing a ton of computers coming in with a fake antispyware program called antivirus 2008. I am trying to make a program that by clicking a button I can end the processes it loads. For now I just need to kill these processes.[code]...Kill Multiple Processes By Clicking Button?

View 2 Replies

Running Different Processes In Multiple Threads Without Overlapping

Jan 13, 2012

I have a sub-procedure which I want to run a different process, depending on what is currently running. I thought the easiest way to do this was by using an ArrayList of each of the campaign details & adding an 'Inuse' field to check to see if the Inuse field is set to 0 or 1. The problem that I have is that when running the process it is all happening at once & the integer hasn't been changed before the next thread kicks in so my threads are running the same campaigns. I tried to avoid the problem by adding a Thread.Sleep(100) delay inbetween starting threads but this led to exactly the same problem.

Here's an example of what I am trying to do:
Imports System.Threading
Public Class Form1
Private Campaigns As New ArrayList
Private ProcessRunning As Boolean = False
Friend StopProcess As Boolean = False
[Code] .....

View 2 Replies

Display All Open Excel Workbooks In A Listbox Multiple Processes?

Jan 5, 2012

I would like to display all open workbooks in a listbox.The problem being that there may be a number of Excel Processes running.[code]...

View 7 Replies

Multiple Windows Forms Opening Upon Program Launch

May 8, 2012

I am running Microsoft Visual Basic 2010 Express. I created a simple program that is nothing more than dozens of Windows Forms that are linked together by the various clickable buttons I put on each form. The program is like a "book" with several pages, and you jump to a specific page by clicking on specific buttons on the current page ("Windows Form").

My question is, how do I change my program so that when it is launched, instead of just 1 Windows Form opening, the program opens up several Windows Forms (of my choosing) automatically? In other words, instead of my "book" (VB program) opening "page 1," when I run it, I want it so that pages 4, 7, 8, 10, and 15, are "opened" whenever I run my "book."

Is there some code I need to insert into each Windows Form I wanted opened automatically when the program is loaded? Or is this a MS VB 2010 Express environment option I need to set?

View 7 Replies

DB/Reporting :: Proper Use Of ADO.NET?

Nov 18, 2009

Whenever I work with applications involving database I have this habit of declaring a global variable that holds reference to a Connection object and keeps it open throughout the lifetime of the application and closes and disposes it accordingly at program exit.I've been doing this since my VB6 days and still doing it now in dotNET. I've read a lot of articles regarding this practice and most of them states that it has great impact on connection pooling. Does this also mean something when my application connects to a database file (i.e. MS Access, flat text files)? Is it true that the DataAdapter and Command objects open and close the connection?

View 2 Replies

How To Get Proper IP Address

Apr 26, 2011

I am running a ASp.Net mvc app in localhost - dev server given with visual studio. I want to get the IP address. I tried

Request.UserHostAddress
and
Request.ServerVariables("REMOTE_ADDR")

In both cases, I am getting ::1 as the result. What is it? Why am I getting it? How can I get 127.0.0.1 or 192.168.1.xxx?

View 3 Replies

Proper Two Way Binding?

Mar 21, 2010

The problem I am experiencing has to do with using DataGridView.Member to access a BindingList.

My app has a UserControl called MaterialsControl, on it lives a DataGridView name dgvLineItems. Using the designer, I've set the DataSource for dgvLineItems to the MaterialsControl. MaterialsControl also has a "Items" Property. "Items" is a BindingList(Of LineItem). dgvLineItems.Member is set to "Items." The LineItem class implements INotifyPropertyChanged

Presently, when I add anything to Items, the DataGridView does not show any changes.Alternatively, when dgvLineItems.DataSource is set to Items (which to my knowledge can only be done manually), anything added to Items appears in the dgvLineItems.

Just for clarification, the DataGridView I'm using is for output primarily, the user will be able to delete values from the view, but not edit them. Insertion is done through an event handler.

View 11 Replies

Proper Use Of IndexOf

Sep 2, 2009

I'm working on some code that was developed by the previous developer of an application and I don't understand why he used a certain syntax for IndexOf().This is the code (MyString is just an example of the string being searched for): [code] I can't seem to find any documentation for this unless it's inside of a loop where the number after the comma is incremented.

View 3 Replies

Proper Way To Use Activex?

Mar 5, 2011

I use thrid party activex control/ dll/ocx file. I add them by using choose items and browse the desire file. When i deploy the application is that works?If not where i add these files which are use at any system where i install my application.

View 2 Replies

Proper Way To Use Resources?

Jun 8, 2010

I'm using VB.Net 2008 .NET 3.0.I am not sure of the proper,or best, way to use Settings and Resources. For now I use the default project wide My.Settings and My.Resources.I have a class that I would like to reuse in other projects, so adding project wide settings or resources in each project doesn't sound proper, nor does creating constants and variables within the class itself.

I'm guessing there is a way to give a class its own resource file, and maybe even settings file, but I'm not sure how to do it. I tried adding a resource file with the same name (but with .resx extension) and I got a weird error saying I was trying to edit a resource that is apart of another project. I continued, but it didn't seem to be what I wanted and I wasn't sure how to access that new resource.I'm not currently concerned with internationalization, but it wouldn't hurt to understand how that would affect what I'm trying to do.

View 6 Replies

Vb 2008 Not Getting In Proper Way?

Feb 13, 2011

why vb 08 help are not getting in proper way. instead getting help for vb 2005 which is not compitable with vb 2008. i m user other vb 8 user must be facing similar problem

View 9 Replies

How To Manage Proper Code

Jul 7, 2010

I have data source and table that I can bind to my controls and datagridview. I can add records to data table and i can view on datagridview but I can't update and Delete records using datagrid. I have following code.[code]

View 1 Replies

Proper Close A Process?

Aug 10, 2011

I have a process, that when you manually closing it. its closing another processs with him. but when you kill it, the process is still open..

i want to know how to Proper exit a process.

View 11 Replies

Proper Creation Of Usercontrols

May 6, 2010

When we create an inherited control then is the Designer still needed or not? Should usercontrols be disposable?What is the difference of using Base and Me when we are setting default properties of our usercontrols?[code]

View 4 Replies

Proper Formatting For Datagridview?

May 18, 2010

I am fixing up a visual basic program using visual studio 2005, specifically in visual basic. I am currently attempting to format the datagridview used to display data from a database. The values from the database being displayed are a mix of integers (used for displaying information such as number of units sold) and floating point values (used to display revenue, etc). I need to format all the values to display as integers (by simply truncating the decimal places, not rounding) as all (including the values that should already be integers which are appearing with two 0s following the decimal place). I have used the round function as follows round(value, 0, 1) which as I understand should get rid of all decimal places by simply truncating them, however I am still left with two 0s after the decimal place. Next, I went to the designer view and edited the columns property of the datagridview so that they are all set to be numeric with zero decimal places, yet the decimal still remains. I followed that by going back into the code and change any CType() that were decimal to Integer and still no change.

View 5 Replies

Proper Separator For Split?

Jan 20, 2012

i need to comfine 3 string after i need to split it my problem is the 3rd string inside contains ,(Comma) so how to seperate by comma

View 16 Replies

Proper Type Casting?

Jun 18, 2009

Delegate Sub UpdateTextHandler(ByVal recbuffpass() As Integer)

Private Sub someSub()
Dim f As frmMain = My.Application.OpenForms("frmMain")
f.Invoke(New UpdateTextHandler(AddressOf f.UpdateTextMethod), New Object() {recbuf})

[code].....

View 2 Replies

.net - Proper Structure Of AJAX Handler?

Jun 1, 2011

My .NET project handles AJAX requests. There are no UI controls at all, it simply responds with text to every AJAX post.

This is my current structure:
<%
SynchLock DBNull.Value
Main
End SynchLock

[Code]...

View 2 Replies

.net - The Proper Way To Dispose Excel Com Object?

Apr 25, 2012

I have following code (obtained from online tutorial). The code is working but I suspect the way to dispose the Excel com object is somewhat not proper. Do we need really need to call GC.Collect? Or what is the best way to dispose this Excel com object?

Public Sub t1()
Dim oExcel As New Excel.Application
Dim oBook As Excel.Workbook = oExcel.Workbooks.Open(TextBox2.Text)[code]............

View 1 Replies

Converting String To Proper Datetime Value?

Jun 15, 2009

I have a datareader reading Date feild from the CSV file as string. it retreives the first record as "03/06/2009" successfully. My system datetime format is dd/MM/yyyy when I insert these values to an access table it put 06/03/2009 i.e makes it 6th March 2009 instead of 3rd June 2009 and so on for the values upto 12th June....after that it starts treating the date monthly correctly..

View 11 Replies

Find The Proper DLL With The OpenSqlFIlestream API Objects?

Oct 2, 2009

find the proper DLL with the OpenSqlFIlestream API objects so i can sue them in VBA/Access. trying to import either sqlnclient.dll or sqlncient10.dll both produce a "Can't add reference to the specified file." error. How do I get these objects into my environment so VBA recognizes and can use them?

View 6 Replies

Get Proper Time Format From DateTimePicker?

May 12, 2012

I have a DateTimePicker to display time (for example) as 05:00:00 AM or something like 07:00:00 PM. When I save my form's data, I'd like to save the time as 05:00:00 or 07:00:00, dropping the AM/PM extensions.

View 7 Replies

Login To My Router / App With Proper Credentials?

Feb 23, 2011

I need to find a way to login to my router/ap with the proper credentials and read from a designated textbox from the router's page and then virtualy submit some input that I might enter in my program to go as like a textbox.

View 3 Replies

Looking For A Proper Usage Of Socket Option?

Jun 22, 2010

As there is almost no documentation for this, I would like to know hot to properly use in VB NET 2008 the keep alive socket option.

Tried this: myTcpClient.Client.SetSocketOption(SocketOptionLevel.Tcp, SocketOptionName.KeepAlive, 1)

but then the TCP does not connect any more, and how do I know when the connection brakes ?

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved