VS 2008 : Prevent Opening Of Two Instances?
Aug 18, 2009What's the best way to prevent opening of two instances (or more) of the application?
View 6 RepliesWhat's the best way to prevent opening of two instances (or more) of the application?
View 6 RepliesI�m fetching data from an access db, filtered by date and an ID. The data is then charted on a form (form1).
I want to be able to "duplicate" the form so that the data that is shown on form1 is shown on a different form. That forms data is not supposed to change when I change the data on the first form.
So far I�ve put som code in a contextmenustrip that opens another form1, but the chart is not showing on that form at all.
I'm thinking that I'm going about this the wrong way so I thought I'd ask you guys what you think I should do?
A little info: When Form1 opens up, it loops through selected dates in a listbox, querying each date. This takes a little time, so I decided to put the data in a dataset on form_load, and then do the drawing from the dataset on form_paint, thus not having to query the database each time the form needs repainting. why the second (or third, fourth etc) form1 doesn�t display the chart?
I am working on a project where i have a home form which has two buttons for login for employee and administrator.after clicking on button login form will open,but i want as soon as login window opens d previous home form must be closed or hide..also there is link on login page for home,but as soon as user click on home link new instance of home form is opening,hnce i want to stop dis multiple opening of the form.i tried close() and hide() but no use.[code]...
View 2 RepliesI have an windows application (created using visual studio 2005) and it also is using an autocad .api. The user runs Autocad and the user enters various commands that will open forms. One of these forms, contains Windows.Forms.LinkLabels with paths to the autocad drawing files they've attatched (.dwg). When they click on the link, I need the file to open in the existing Autocad they already have open; however, the problem is that it's opening a new instance of Autocad and placing the file into it. How can I make it so it opens in the existing Autocad program already open? [Code]
View 4 RepliesI'm using Visual Basic 2008 Express Edition. When I have my personal program open, I don't want another instance of it to open. I would like it to detect if the program is already open and if it is, it won't open another.
View 4 RepliesI am making a webbrowser,how to prevent my browser from opening new IE windows. Because what happens is, there are some links that will open new windows and therefore IE comes in place because it is set as default windows browser which I really don't want because my browser looks really bad if it opens links in another webbrowser.I want it to be just a basic browser, it has only one window, and it should navigate within that window. This is because the browser is integrated in a bigger application only for some website applications that are related to this main application.I am using VB.net 2008 Express Edition?
View 9 RepliesI've been trying to open a program called 'DET 3' which is designed by the Honduran government and helps us pay taxes for the government. I've been getting this error message when I try to open the program "Component 'Mscomctl.ocx' or one of its dependencies not correctly registered: a file is missing or invalid" I need this program to work so I can pay my taxes before July 10th.
View 8 RepliesI have developed an application in VB.NET. It has 20 forms. All 20 can be opened from a menu strip control. The user should be able to open only one form at a time. How might
View 3 RepliesI want to prevent file opening (temporarily) on certain files. I've tried encryption, which is fine, but a bit slow for my purpose. The actual end product doesn't have to keep some computer hacker type from getting in, just the lay user. I was wondering if it was possible to encrypt only part of a file and reverse this after or what options I had.
View 1 Repliesi want to create an exe in vb.net by packaging few perl files along with it. when i am packaging those files i am able to hide those files by making the hide option true. but if the 'show hidden files' is selected those files will be visible. I want to lock/prevent the user from opening the perl file/code. want to know if there is any way to do it.
View 1 RepliesI am programming a chat like application using Tcp. Now I have a probem. I am going to have loads and loads of data being transferred so I will have to use 4 seperate ports.[code...]
My problem is for me to use a maximum of 4 ports all together transferring data from the client(s) to the server(s) I will need 4 clients and 4 servers. I need to open 4 instances of 4 clients. I was going to put a client in a form and then when the client is running it creates 4 instances of that form but than there would be too much confusion going on. I think there my be a way to use Classes instead of forms.
[code...]
My ultimate goal is to get a list of PIDs and have a user select 1 of them.For example: the process image name is program.exe. The application name varies for each instance the program.exe is run, and therefor each application name has its own PID associated with it. By application name I mean the Task name under the Applications tab of Windows Task Manager. Another issue I face is that some systems run x64, so the name is no longer program.exe but program.exe*32
So my issue is, how do I search for program.exe, or on x64 platforms program.exe*32, and if there are multiple instances of program.exe/program.exe*32 running, how can I get a list of PIDs for each and associated them with the application name as the Task name under the Applications tab of Windows Task Manager.that might sound a bit confusing! So if it is, please let me know and I will try to explain more. Any reference guides or example code would be greatly appriciated as I have only used the "System.Diagnostics" but once.
i have a small prog to test the instances when i run another instance then i want to count it, ex. i open sample.exe this should be 1 in label and i open another instance of sample.exe this should be 2 in label how can i do this
i try this code but the instances count are not working
Dim count As Integer = My.Application.OpenForms.Count()
Label1.Text = count
Is it possible to create instances of controls on a form ? Of course I mean visually , not just by code. After all, these languages define themselves as "Visual" so they should provide that possibility. It is important for the instances to be visible during design time because otherwise we could only guess where those controls might "land". Nevertheless , I have the feeling this is not possible in VB .NET but still I thought I should ask first ...
View 11 RepliesIf I declare and instantiate an instance of class B within class A, how do I make instances of class A member objects/variables accessible from class B?
View 11 RepliesI have 30 instances of the same form running. Video array with different video on each. Each form is named "oneForm". I'm looking for a way to close all forms with one click. I have found that I can hide the forms no problem like this.
for each killfrm as form in my.application.openforms
if killfrm.name = "oneForm" then
killfrm.hide()
[code].....
I have been trying to create good multithreading programs and it is not working well considering the use of global variables, local variables etc and thread safe controls. I have not found a good way of doing it since it seemed to be not as efficient as just running it on a single thread.
The program accesses facebook and twitter api, parses etc. and I am wondering if I can just create new tasks and map the program project file and fire new instances of the project. Someone this using the taskfactory in 2010 but I thought this was just the same as the threadpool. on this: create windows services and set them to run on task scheduler??
Within the subroutine, I am counting the number of open Forms and dividing the bounds of the screen by the number of open forms everytime a button is clicked.his gives me a way to Size each video box perfectly according to the number of forms open.This is where I have found a problem. The size of the new window only sizes the newly opened on and will not resize the ones that are already open. I will give an example of my subroutine.Note: Because of the nature of my program, I am not allowed to take any code out of the work zone and so I will be summarizing what I am doing rather than showing the actual code.
Private videoShow (byval videoName, byval videoIp)
dim videoForm as new form
videoForm.size = New Drawing.Size
[code]......
I currently have a sofware with 80 customers.All share the same database structure, when data are differents.We got 5 database for each customer.Today, we have named instances, so the program is accessing to Bdd with something like :
Connect to 127.0.0.1/CUSTOMER1
select * from base1..table1
Now, we need to change, we got many instances.The idea is to have unique SQLSERVER instance, obviously i want to avoid changing the code (VB.NET).Just tried to play with schemas and users, seems to be an option, but since the schema is under the database, in can't make it works :
Connect to 127.0.0.1/GLOBAL_INSTANCE as specific user (customer1)
select * from base1..table1 -> error @ this point
When THIS works :
Connect to 127.0.0.1/GLOBAL_INSTANCE as specific user (customer1)
Use Base1
select * from base1..table1 / or select * from table1
I can easily script some user or schema creation, and change connection strings for all customers, but i can't really change All requests: huge number.
I'm having a lot of trouble finding a solution to my problem, and its probably because I don't know exactly how to ask the right question - can anyone here point me in the right direction?
View 3 RepliesOk I have a project which has a MDI parent. Inside the parent I have multiple isntances of a form load(frmLine1t5). When my program loads it will load a different form(frmSelect) and if I manually load a different form(frmRetests) I can put frmSelect on top of frmRetests and bring one another to the front if it's clicked on(without using the bringtofront method)However as soon as I load a single instance of frmLine1t5 I immediately can no longer bring ANY form loaded into the MDI parent(before or after frmLine1t5 has loaded) to the front. I can only bring them to print IF I use .bringtofront method
View 1 RepliesI have 4 radio buttons in a group box that I populate with answers from a database.
1.) The way the program works is I first populate one of the buttons randomly with the correct answer.
2.) I then proceed to populate the remaining buttons with False answers, by starting at the first button to see if it has a value or not. If not, it is then populated, if so then its skipped and I move on to the next button. This continues until I populate the remaining three buttons with false answers.what is the best way to prevent the three false buttons from having the same value? And where can I find an example.
i have two form 1 is maximize and the other 1 is small type kinda login system..and i dont want the user to click the main form, it will access the main form if he types the correct info on login form..
View 3 RepliesI have 2 window forms, form1 has a button, which will send a msgbox when I click on, and form2 closes when it's deactivate-event raised. If I have form2 focused, and I click on the button of the form1, form2 will get focus and then close, but no msgbox showed from form1, what should I do to get the msgbox in that case?
View 5 RepliesI have the following code for SQL insertion, but how can I prevent data dublication in vb.net so that the same data is not entered twice? I mean can I add a exception in my code to check if one of the field in the sql server table contains the same data? [code]
View 14 RepliesAny way to prevent my application from taking screen shot. I am using this method
If Clipboard.ContainsImage = True Then Clipboard.Clear()
If this is correct? And also what about screen capture application they take the screen shot without using clipboard what is logic behind it and if there is any way to resolve it?
I am using a database (access) were i am not using a primary key field. I would like to prevent the user from entering records , if certain fields allready exsists.
I would like to check for 3 of the fields. When these 3 fields has been filled previously with the same data as the new data, i want to return a message.
I am looking at the fields txtWeeknumber.text & txtTopic.text & txtSubOutCome.text
Here are some of my
[Code]....
I have a code which registers keypresses even if it's running in the background.Is there a way I can capture the keypresses, but prevent the keypress from going to any other app? Microsoft Word and my program is running.if I press to 'Activate' button the program starts capturing all keypresses. This makes it impossible to type into Word, or any program for that matter as long as my program is activated.Once my prgram is deactivated I can type in any program normally.
View 11 RepliesHow can i do this ... by the propper way i mean so that the grippers don't even display - like they do with an auto-sized label, or a non-multiline textbox.
View 4 RepliesIs there a way to prevent this from happening?
Namespace testing
Public Module TestModule
Public testobj As New test
End Module
End Namespace
It is extremely annoying to have to start out two tabs to the right on new code. Is there anyway to disable auto-indenting just for namespace declarations in visual studio 2008?