File I/O And Registry :: Allow User To Click 'Cancel' To Allow VB Application To Continue Running
Nov 5, 2008
I have a VB application and I want to allow the user to choose an option between "OK" and "Cancel" buttons when he want to exit the VB application. So far, I cannot figure how to allow the user to click "Cancel" to allow the VB application to continue running. [code] So how do I allow user to click "cancel" button to prevent from exiting?
View 3 Replies
ADVERTISEMENT
Jun 5, 2011
I was thinking I could make a console application that would have a FileSystemWatcher - watching for a .BAT file being created in a folder - and when it sees that file it does a PROCESS.START on it.
View 3 Replies
Apr 1, 2012
I was thinking I could make a console application that would have a FileSystemWatcher - watching for a .BAT file being created in a folder - and when it sees that file it does a PROCESS.START on it. But I'm seeing that a console app doesn't continue running.
Imports System.IO
Module awcWatcher
Sub Main()
Dim fsw As New FileSystemWatcher("D:ACS DesktopAWCeportingstaging")
fsw.NotifyFilter = NotifyFilters.FileName Or NotifyFilters.LastWrite
[Code] .....
How would I go about making this wait and then wait again and again and again?
View 9 Replies
Aug 19, 2010
When running a console application, the dos window disappears without asking for a "press any key to continue", why? What setting in 2010 is not set correctly?
View 3 Replies
Dec 13, 2011
I have created my own version of word pad. When I click save on the file drop down, the save dialog box pops up, but if I click cancel then my program crashes. I am not sure what I need to do so that if I hit cancel, it will just return to my program.[code]
View 2 Replies
Feb 17, 2009
I have a coding to let user select 2 files to import:
[Code]...
But if user click cancel button at Browse2 button, the system will paste the value from Browse 1 to Browse 2 text box. How to do nothing if user click cancel button at OpenFileDialog?
View 6 Replies
Feb 17, 2009
I have a coding to let user select 2 files to import:
-------------------------------------------------------------------
Private Sub btn_Browse_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdBrowse1.Click
On Error Resume Next
OpenFileDialog1.Filter = "Lis files|*.lis"
OpenFileDialog1.FilterIndex = 1
[code]....
But if user click cancel button at Browse2 button, the system will paste the value from Browse 1 to Browse 2 text box.How to do nothing if user click cancel button at OpenFileDialog?
View 1 Replies
May 18, 2006
I validate a DataGridView with the CellValidating-eventhandler.That works fine. However, I want to avoid validating when the user presses the Cancel button. In the sequence validation occurs before the event CancelButton.Clicked.
View 1 Replies
Jul 18, 2011
I'm running an application under an account that is not the account logged-on to the PC.
Within the application I need check if the logged-on user is a member of the Administrators group. Below is the code I'm using. From what I've read, WindowsIdentity.GetCurrent() should return an object associated with the logged-on user. It doesn't, it returns the same information as the call to System.Threading.Thread.CurrentPrincipal. Which is the information associated to the ID running the application, not the logged-on user.
[Code]...
View 8 Replies
Jul 12, 2011
Which is the best way to store application and user settings of an application running with multiple instances?My problem is that using the vb's "Application Settings" one instance would overwrite the other one.I want to identify each instance with a number passed via command line argument. I could use this number to identify the appropriate settings of the running instance, but I see in a local INI o XML file a better way to handle that.
View 1 Replies
Oct 7, 2011
I have a spellcheck program for an external application. My vb.net app calls a .vbs file to invoke the word spellcheck engine, runs the spellcheck, copies to MS clipboard and then I want it to automatically paste back into the active window. What my issue is, is that I need a delay or check of some sort in the code so that I can know when the vbscript has been completed before pasting text to to the window. I've tried the following but the app invokes the script then immediately checks to see if the script is running (which of course it is) so it's useless... Or is this something I should change/handle in the vbs file? I'm not very good with vbscript however.
[Code]...
View 7 Replies
Dec 4, 2009
I have an application which is running off multiple user desktops (app is in vb.net/vs 2008). The application pulls its data from an SQL 2005 Server (which holds all of the main data tables as well as a bunch of reference tables). So for different projects, the application pulls in data from the main tables... ie, Project ID, Project Cost...and so on.. The data is contained by ID's and when the data is imported into the application, the look up tables are used to convert the ID's to names.. so instead of project ID, the user would see the actual project name. Before the data is written back to the db, it is converted back to ID's ... anyways, there are a bunch of these look up tables, (for vendors, different expenditure codes, projects, sub projects.
[Code]...
View 3 Replies
Jun 29, 2010
Im making a application where you need to click in the webbrowser before the button will be enabled, how to do it?
View 3 Replies
Oct 14, 2008
On an xp system using VB 2008 exprees, I'm trying to write code which will change a file's permisions when run from a non admin account. To do this I need to now how to run the code as an administrator. I've got the code to change permissions working, I just don't know how to run it with an administrator's credentials. The code is:
Imports System.IO
Imports System.Security.AccessControl
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
[code].....
View 1 Replies
Aug 1, 2010
I'm using a BackgroundWorker to perform some analysis on a separate thread. The BackgroundWorker is called when a user clicks a CheckBox.
I need to provide for the user clicking the CheckBox, starting the BackgroundWorker task, and then changing their mind and clicking the CheckBox again.I simply want to cancel the currently running task and set the analysis off again. Currently I have the following method:
Public Sub UpdateParkStatusAsync()
Try
'Debug output.
Console.WriteLine("UC_Map_ViewModel.UpdateParkStatus called.")
[code]....
View 5 Replies
May 20, 2012
I have an application which uses hotkeys which are to be defined by the user. It is a combination of 2 keys, either CTRL, ALT, SHIFT as one hotkey and the F* Function keys as the other (e.g. CTRL + F1, ALT + F2 or SHIFT + F8) As stated these are then chosen by the user before a global keyhook is put in place to listen for them and trigger an event. In my app I have all my function keys as follows:
Public Const VK_F1 = &H70
Public Const VK_F2 = &H71
Public Const VK_F3 = &H72
[code].....
View 1 Replies
Oct 25, 2010
I've used Visual Basic on and off for years, but for some reason this has never crossed my path, though it's probably relatively simple.
I have a program which runs in the background, in the System Tray. (Which is to say it has a NotifyIcon and is Hiding.) Using the Registy, I've added a new item to the right-click menu for certain files (for example PDF) which reads "Accept".
The goal is to have this open the file in my program and have it run the script. The script itself works flawlessly with an Open Dialog box - all it does is change the "comments" on the file. But I can't for the life of me figure out how to do it without the dialog box.
View 1 Replies
May 29, 2010
My program requires the reading and writing to a file that is shared among all users of a system. Currently I keep this file (an XML configuration file) in the directory that my application is installed to, which is C:Program FilesSomething by default. On Windows 7 (and probably XP too, but I haven't checked), regular users cannot write to this file. While I could probably set permissions as needed in my installation program, I'd rather find a more appropriate place for this file.All users need to read and write to it. Doing some Googling turns up C:ProgramData for Windows 7, but XP doesn't create this folder. Is there a common place on both platforms? Finally, is there an environment variable I can query for it?
View 2 Replies
Nov 8, 2009
I'm trying to create an app to launch at start up that will ask you what applications you want launching, or if you want all your favorite app's to start up etc. But before I go any further, I think its crucial to know how to save settings that a user has entered (such as program location and name in this case) so that he/she doesn't have to enter them every time at start up.
So far I have just made this, can anyone tell me how I would get it to save the settings entered?
Code:
Option Explicit On
Module Module1
Dim name As String
[Code]......
View 1 Replies
Apr 30, 2010
I have constructed a user control and I would like to be able to save a simple option (very little data) that can be loaded/saved.There could be more than one of these on a form.And if I were to write a small program for my wife, I wouldn't be sure what directory to use to store the data
View 4 Replies
May 3, 2010
I am having a form1 with only two buttons----
1) Start backup
2) Cancel
If "Start backup" is clicked.... system requires a lot time for backing up many files from source to destination. If I want to free the user before "Start backup" procedure is not completed ...
then what would be the code for "Cancel" button...? Only I want to stop the running procedure of "Start backup" quickly.
View 6 Replies
Jan 30, 2009
I have written documentation on how to use a software application I have written. I am placing the documentation (a .pdf file) into the application's bin > debug folder and putting it in the application's program files upon installation.
How do I open that .pdf from a menustrip? For example, I have a help > instructions menu item on my menustrip. When that is selected from the menu, how do I make the .pdf open?
View 1 Replies
Mar 6, 2012
I have a parent form and a few subforms. When the user clicks the red X to close the form I have a dialog box open that asks the user if he wants to exit the application. I have a issue when the user clicks no the application closes anyway. I am wondering what I am doing wrong. [Code]
View 8 Replies
Aug 6, 2009
I have managed to automate the following page: https://post.craigslist.org/atl/S/msg/none/x and even click the "Continue" button, but I noticed that my vb 2008 program is creating an infinite loop and tries to click "Continue" buttons on following pages. I only want my program to click the continue button once, fill out more data on the next page and then click another continue button on a later page. But I need the following code to end on the first page before I can continue coding for the following pages so that the web browser doesn't go crazy.Here is the code that I am using and not sure if this is called an infinite loop, but that is what it seems to be doing:
theElementCollection = WebBrowser1.Document.GetElementsByTagName("button")
For Each curElement As HtmlElement In theElementCollection
If curElement.GetAttribute("value").Equals("Continue") Then[code].......
View 6 Replies
Jun 20, 2012
SoftwareVersion: Visual Basic 2010 Forms and Applications...Application shows unhandled exception error message..How do you disable, or auto-click continue on all "Unhandled Exception" error messages?
View 8 Replies
Mar 25, 2009
My program runs under a limited account, and uses impersonation to access admin codeI also have a program in the same folder, that my program runs sometimes when it exitsBoth exe files are in the same folder in the "Program Files" folderIf I try to run the other file, I get a not found error.If I Raise the first program to admin (even though it should already have admin rights due to impersonate) it can run the second file.1. I don't want to raise to admin.2. I'm using the full path and file name to the file.3. That do i need so that dot net can find the file so that it runs.
View 2 Replies
Nov 8, 2009
Whats the most efficient way to read in moderately large data tables of constants? Im talking about maybe a few hundred items in a vector, or some 6 x 6 or 8 x 10 tables of numbers or strings, that kind of thing. (Im aware that they arent really stored in two dimensions.)In the old pre-Windows versions of Basic, wed use READ and DATA statements.In VB, we can read from an external file. I dont like to do this because something might happen to the file.
The resource file is another option. The setup is tricky, but once you get it its simple to maintain. It does involve reading strings and splitting them up to get numbers, which should be slow.Then theres the brute force method, where you just fill in the array in the source, you know,x() = {303, 279, 274, 268,} and so on for many continued lines. Some work to get everything in the right place, but one time only. I suppose that this makes the executable bigger.
View 2 Replies
Dec 21, 2011
I have one inputbox, but the problem is when I click the button Cancel my program falls. I wish that when I click on button Cancel, inputbox close. And i wish, when input field empty ,OK button can't be used. I have visual basic 2010
View 6 Replies
May 26, 2009
I have a GUI with a few button on it and each button start an application. I want to prevent the application to start twice if the user double click on the button. How can I do that?
View 7 Replies
Aug 7, 2009
in vb.net i am trying to save application settings but for USER but i cannot find the user.config file
when does this file get created?
i searched my entire hardrive. i also searched the entire project.
View 2 Replies