Prevent Software To Be Opened Twice?
Dec 21, 2010
I want my software to only opened twice. If they open it again, it will just put the current software in focus, instead of making a new instance. How can I do this?I also want to 'transfer' the launch parameter over to the other application that is already running.I'm terrible to explain my self, but if you got Steam, you can try it there and you will see what i mean.If you open "Steam.exe" from "C:\program files\steam\steam.exe", it will just open up steam window, with out starting a new process\instance of it.Example. If you already got steam running, and try to open this link: steam:install/70130, it will send that info to the current running process and start download the demo game.ing.
View 7 Replies
ADVERTISEMENT
Jan 24, 2009
I made a Class Library project that contains the main classes that my Main Project needs because I don't want to main classes when I distribute my project. I've successfully called and used it in my Main Project. But when I started debugging and stepping through my code which involves calling and using the class I wrote in my Class Library, I noticed that the class' file in my Class Library opens up during debug mode.
how can I prevent the Class Library's files from being opened during my Main Project's debug mode?
View 1 Replies
Apr 1, 2012
I have a project the was written by someone else. I am very new to VB. I am trying to make changes the the project. When I first opened it it went through the conversion with no errors. The report has not errors however when I try to open the project I get the error "vbproj cannot be opened because this project type (.vbproj) is not supported by this version of the application". I am using VB2008 Express and have read all the other responses to the issue but Ijust do not know waht to do.
View 3 Replies
Nov 29, 2009
If I need to run a sub from another form, I would normally do something like this:
DirectCast(Application.OpenForms("frmTest"), frmTest).PublicSub()
How would I run the sub if the user never opened the form? The form is an options form and it may not be opened by the user if they opt out of changing the default values. I don't want to change the location of the sub because the sub relies on a lot of info on that form.
I tried Google and playing around with intellisense, but I've come up with nothing so far.
View 8 Replies
Sep 6, 2010
I have question regarding how i can check if the form is opened or not ??
View 2 Replies
May 31, 2009
I have 3 simple questions:
1. How to check if a form is opened?
[URL]
End If
2. How to play a sound (just a beep or something?)
3. When i have a string with keywords, separated by ","'s, how to convert this into a array? (F.A. Test1,Test2,Test3)
String.Split(",")
View 4 Replies
Mar 10, 2010
Check If Folder Is Opened?
View 2 Replies
May 1, 2012
I've got an application which I want to only have 1 open.How would I make it check if the application is already open and only open if it isn't? I've had the idea of using 2 forms, one of which is the proper application and the other which just checks if its running then opens the other form.I would imagine it would check if there's more than 1 of the process name running and if there is close all others?
View 5 Replies
Nov 7, 2011
I have a Visual Studio 2008-SQL Server 2005 app that will be throwing alot at it. It's my testbed learning app. I'm also a student of this craft(43 years young) like another poster posted on another thread. I come from a PICK/BASIC jBase background. Anyway as-is my app has a connection to the database that is opened on form load. I close the connection on form close. It's a one form app currently. Is this wrong? It seems that maybe I should not have a connection opened possibly all day. I'm looking into incorporating Datasets, dataAdapters into my next phase of evolution. I looked at the material and it's tough. For me anyway. But I will get into it. I will fetch the data into a dataset so that I can keep the connection open only for a little while. I was turned on to this "keep the connection just as long as you need it" idea from someth
View 3 Replies
Feb 20, 2010
I can't connect to my database now, although yesterday it was perfectly fine. An error message comes up saying "...A database with the same name exists, or specified file cannot be opened, or it is located on UNC share" this has never happened before. Why can't I access my database?
View 2 Replies
Oct 17, 2009
I'm trying to detect which contacts are currently opened, the only way I could come up with that was to actually get the items in the windows taskbar then compare the items to the contact list on Msn. This way when Bob@hotmail.com is currently opened my application can show a listbox of all the current opened Msn contacts. Is there an easier way to view the current open contacts with MessengerAPI
View 3 Replies
Sep 2, 2009
I Was Trying To Get The Username Opened The Process From The Property Process.StartInfo.Username but It Didnt Work I Want To Know If There Is A Way To Get The Username That Opened A Process (I Mean A Process That Is Already Opened)
View 6 Replies
Apr 24, 2009
I have created a windows application which creates a database file and saves it to disk, it uses a custom file extension so that when the file is clicked it opens the application. In order for the application to use the data in the file it needs to rename the file so that it has a .mdb extension. My problem is that I cannot see how to get the name of the file which opens the application.
View 2 Replies
May 15, 2012
i want to detect currently opened swf file name here is my code
Private Const GW_HWNDNEXT = 2 Private Declare Function GetWindow Lib "user32" (ByVal hWnd As Long, ByVal wCmd As Long) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
[Code]....
this code is working fine to detect .doc,.xls files name but not working on *.swf files
View 3 Replies
May 26, 2010
I'm exporting my Dataset to an excel file, and I want to make sure I keep any file errors under control. One in particular that I'm concerned about is accessing a file that's already open. A general IOException occurs that says:
"The process cannot access the file 'C:Reports eport300.csv' because it is being used by another process."
Here is the line in which the error will occur:
Dim output As New IO.StreamWriter(path, False, UnicodeEncoding.Default)
I guess I could just throw a try catch around it, but what if an IOException happens that isnt related to this particular incident? Is there a way I can check to see if the file is already open before allowing this code to run? Especially when I'm using excel.
View 1 Replies
Mar 15, 2012
I made a quick search program so when I browse for a text file, it adds that text file to a listbox1. And then when you search result will be placed in listbox2 Now I'm wondering how to force the program to automaticly load last opened text file on startup.I tried with this and then I stuck.
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim reader As IO.StreamReader = _
New IO.StreamReader(winDir & "system.ini")
[code].....
View 19 Replies
Mar 24, 2010
I've tried searching this forum for an answer to my problem with no luck. I've set my program to allow multiple instances of it to run. Is it possible for each instance of it to determine if it was the first, 2nd, 3rd, etc to be opened? It would be very useful if for example if the program has been opened a 2nd time I would like to be able to load a different set of parameters for certain things for the 2nd instance. The same with the 3rd instance.
View 9 Replies
Feb 29, 2012
How can I upload an image 1.png into the program and then once the program is opened, that image gets saved here:LibrariesDocumentsand if there is already a file called 1.png in that directory.
View 5 Replies
Jan 14, 2011
I have the code below:
Dim i As Integer
Dim objExcel As New Excel.Application
Dim objWorkbook As Excel.Workbook
objExcel.Workbooks.Add()
[code]....
At the end of this routine, eventhough the data was correctly saved to my Data.xlsx file, this routine also opened 15 EXCEL.EXE tasks in task manager.I thought that I had cleaned up before quitting. By the way, whether I write to 1 or 5 or 10 cells in Data.xlsx, 15 EXCEL.EXE tasks would be opened regardless.Is there a way to (easily and) completely close all EXCEL.EXE in task manager before leaving my application?
View 8 Replies
Feb 19, 2009
I have the following code to open an Intel format hex file. The file is like this
:020000040000FA
:1000000000000000000000000000000000000000F0
:1000100000000000000000000000000000000000E0
:1000200000000000000000000000000000000000D0
[code]....
After I started running my code, I was told "Error opening file". Can anybody tell me what's wrong? Also how to retrieve each byte on each line to array HexValue?
View 2 Replies
Jan 5, 2010
I'm launching an Access ADE, using Tony Toews auto FE program. The AutoFE programs will, if newer version available, copy the latest version of the ADE from the server, then launch it. My code looks like:
Dim stAutoFE As String = "V:Appsautofestartmdb.exe /cmd /inifile: " & """" & "V:AppsAutoFESSP.ini" & """"
Shell(stAutoFE, AppWinStyle.Hide, True)
System.Threading.Thread.Sleep(1000) ' Time delay
[code]....
I had to put the Sleep delay in, otherwise the GetObject would open the ADE a second time.But I don't know how long the copy from the server will take, so I need to remove that Sleep line and check that the ADE has opened.
View 2 Replies
May 4, 2011
I have a couple of files which I have to update periodically through a process written in VB.net . These files are on a server and part of a domain that many users can access. These files should never be written to as they are for reference only. I need to be able to overwrite some of them even if a user has them opened. Is it possible to do this? Presently the files permissions are not set as read-only but I can do this as long as the user under which the process runs will still have permission to overwrite them.
UPDATE: thx for your responses. The files are pdf and are opened by clicking on them from windows file explorer. This also happens when a user simply has the file selected in windows explorer.
View 2 Replies
Apr 2, 2009
I have a nokia phone, which is connected to my PC through Nokia PC Suite. Whenever I get a call on my phone, a small window appears above System Trey. I want to read out the number of caller that appears on that window through my program, so that I can use it further.
View 1 Replies
Mar 7, 2011
The problem I have is that I have a 3rd party add-in working in excel to convert certain info into a barcode.
When I open excel normally, the add in works without a problem, but when I open it through excel it just doesnt work until I manually go into the add-in option, disable the add-in and the reenable it.
View 4 Replies
Apr 15, 2010
I just trying to made word add-ins that gone save opened document.I made ribbon and button on it.Below is the that i use for saving word document on certain location:
[Code]...
But when i click on this button i just made email.doc but that document does not contain any content of the opened document, it just made new doc file.What i am doing wrong? The event on this button need to just same as event on standard Word save button, so how i can do this?
View 1 Replies
Sep 10, 2011
How do I close all opened forms which are created on the fly?
Sub OpenForms
dim F as new frmForm1
F.show
[code]....
I want to close all opened frmForm1?
View 2 Replies
Nov 29, 2011
I tired this code to check if the Excel File is already open but didn't succeed
vb
Dim exl As New Excel.Application
If exl.Workbooks.Open("C: a1.xlsx") Then MsgBox("Yes")
View 6 Replies
Oct 8, 2009
i am stucked with a procedure in my app. this procedure do monitor application.startuppath folder. if this folder is opened by user my application should close it.i have tried it to be done with system.Diagnostics.process. but wont be able to make it possible.
View 9 Replies
Jun 12, 2009
i create a mdiparent form and a form1, all i wanted to do is to close the mdichild form(form1) with a close in the menustrip.When i want to close the opened childform with menustrip (i create a button close in the menustrip)
View 10 Replies
Jun 2, 2010
I am developing a windows service, in vb .et, that launches a legacy application that performs some work. The service acts as a wrapper around the legacy app allowing users to automate an otherwise manual operation.Everything is working great, except occasionally the legacy app displays a messagebox. When it does this the process halts until the message box is closed.
As the service will be running on a server there will be no user to close the message box.The service launches the legacy application in a System.Diagnostics.Process.My question is, is there way to detect that a message box has been displayed by a process that I have started using System.Diagnostics.Process and is there a way to through code to close the messagebox.
View 2 Replies