I was wondering how someone could stop a For loop in the middle of it, according to parameters. I have tried but cannot find a solution that works, I suppose an example of this would be if a loop were increasing a label by 1 from 0 to 100 and the user sets it to end at 57 or any number in between and when the loop reached the number to stop.
I used a combination of If and doWhile loop codes. Is it possible that the loop will stop at 2nd loop if it will perform a 3 loops?I'm creating an app that if the problem is got the match at 2nd out of 3rd loop, the loop will stop.
I was wondering if there was any way to stop a for loop untill i have user input, once the input is correct continue the for loop, is that possible at all
How would a person stop a try loop once it has started a button click on the same "Form1'? Let's say in this example p = 100. If I wanted to stop it using a button how would I, I have searched Internet and found nothing that is working.
My problem here is that what the loop does is click on another program, thus taking the focus off of mine, how would i be able to make my app see if I press the key even if the form isn't in focus?
I have an application that is on a server running. The way I have it setup is I put it on the Windows Scheduler to run at certain times. We now need to run it constantly on the server. I change the code to put in a loop until I pause or stop it. One issue I have found is that I can kick it off but when I close out of my remote session the application stops.
How do I keep my application to keep running even after I sign out of RDP?
<UnmanagedFunctionPointer(CallingConvention.Cdecl)> _ Public Delegate Sub DeviceDetectionEvent(ByVal YasdiEvent As YASDIDetectionSub, ByVal DeviceHandle As UInteger, ByVal param1 As UInteger)
I need to be able to edit vb.net code using visual studio without stopping the debugging executable.How can I go about doing this? If it's impossible, how can I code and reload that code without stopping the executable? I know of scripting languages like Lua, but I fear the implementation of another language within the VB is unnecessary to save me the trouble of stopping the executable. The issue is that starting and stopping this executable can take a very long time, and I need to be able to edit the code quickly and frequently.
I wrote a custom windows service (VB .Net) to run some processing on data files in the background of one of our servers. The service basically finds the next file to process, breaks it apart and makes a PDF or two - nothing super complicated. It utilizes a timer, if a file is not found, it waits a bit and checks again (repeat indefinitely). The service has run for a week or two with no issues/pausing/stopping. I have plenty of error handling for this and I have not been able to break it... until today.
I've just installed Visual Studio 2010 Express on a new laptop running Windows 7 64 bit.
When I debug a VB project and an error is encountered a message is sent to the immediate window, but execution is not halted. This means I am unable to look at variables etc.
I was woking on a windows app today when my errors were no longer being displayed as they usually would, instead the debugger just jumps out of the method. It works in other projects, I have put this: 'Dim i as Integer = "A"' in as my first line to try and raise an error but it just exits the sub on that line.
The output window makes a note of the exception but the usual popup trace does not appear, any ideas how I get it back??
Basically I am trying to get my timer to stop when it reaches a randomly generated number.
I have dimmed num2 as integer (num2 is timer) I have dimmed num3 as integer (num 3 is random number) I have done num3 = randNum.Next (0, 8)
My timer is working perfectly and counts from 0 -8. My randomly generated number works too, so how do i get the timer to stop when it reaches the random num?
I have tried; if num2 = num3 then timer1.enabled = false But that didn't work
Since the coming of Windows7 at our office we have sometimes the issue that the print spool is crashing.Users don't have admin rights to restart the service so that leaves them only at restarting their computer as solution.Which costs alot of time... As we cannot find a final solution to this problem I've begin to write a small tool so they can restart it..I've only hard code a local admin account in the source for this operate for them..
I am writing a little app to take over from Active Desktop as we are using Win7.
I am having problems getting my form to stay open, if the user hits the "Show Desktop" button the form minimises. I need this to stay open at all times in the back ground.
I have disbled the minimise button to stop the users using it.
how I can stop this from happening or if I use a timer to check the windows state it apears normal as it looks like the "Show Desktop" button does not actually minimise the window!
Makes the following statement about the code below:
**"The computer evaluates the loop condition in the Do...Loop statment to determine whether the loop instructions should be processed. In this case, the inputsales <> String.Empty condition compares the contenst of the input sales variable to the String.Empty value. As you know the String.Empty value represents a zero length, or empty, string if the inputsales variable is empty, the loop condition evaluates to True and the computer process the loop instructions. *If on the other hand the inputsales variable is not empty, the loop condition evaluates to false and the computer skips over the loop instructions.
Based on the code I think it is the opposite: ...that while the inputsales value is not empty it should evaluate to true and process the loop and if it is empty it should evaluate to false and skip the loop?
I can't get the loop to work. The calculator is suppose to show how far someone goes for each hour increment (i.e. if they punch in 3 hours, it should show a number for 1 hour, 2 hours and 3 hours; if they punch in 10 hours it should show a number for 1 hour, 2 hours, 3 hours....etc. up to ten hours, etc.) I can't get it to show anything except for the total number of hours traveled and total distance.
Private Sub DistanceButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DistanceButton.Click Dim speedIsValid As Boolean
Is there a way to stop other subs from running while in a separate sub.
for instance say your in the sub CreateNumber() and the subs are setup like CreateNumber() AddNumber() DeleteNumber()
Is there a way to be in CreateNumber() and call a function to stop AddNumber from running after creaetNumber() is finished? i just want my program to sit there to wait for an event to happen.
I'm currently programming a music software which plays notes which are listed. as timer ticks, the notes change and so it plays a different *.wav file. The problem now is that the previous sounds stops when a new sound starts. i want them to overlap each other until each one has finished. Code: my.computer.audio.play("file.wav")
I've been trying to create a timer that waits for another timer to finish with its coding and, when it's finished, executes a series of code before stopping itself.
This isn't the code for the actual program I wanted to implement this self-stopping timer in, but it's simple and has the exact same problem:
Public Class Form1 Private Synchro As New Timer() Private Sub MeLoad() Handles Me.Load
[Code].....
The idea here is that it's suppose to (using a timer) show the messagebox ONCE and ONLY once per button click. However, what seems to happen (despite the fact that I have 4 ways of trying to tell it to stop) is that the program creates multiple messageboxes until there are a total of about 49 messageboxes on the screen at the same time. I don't know if I'm using the wrong event (unlikely as Tick seems to be the only timer event) or there's a way of stopping the timer that I don't know.
I created a service in VB.NET and it runs fine on Vista, I can log off and switch users and the service auto starts and continues to run every time without fail.If I install and run the service on Windows 7, it will not start after a logg off/on or after I switch users.
I have a WCF service, which I can open and close by doing:[code]The problem with this is I have "downtime" of the service in between myService. Close() and newService.Open(). if anyone tries to connect while this is happening it fails. how can I make the "downtime" as small as possibel?
I'm trying to figure out the code for the timer that would allow me to stop the timer after X number of runs through the code. Here's what I have so far:
im tmr_cnt As Integer tmr_cnt = tmr_cnt + 1 If CInt(boxAns.Text) = CInt(lblnum1.Text) / CInt(lblnum2.Text) Then
I'm developing an interface for users that will allow them to enter data into a database without having to know SQL. Problem is, some one out there probably does.
How can I stop them from deleting/screwing with my data when they're typing entries within my text boxes?
For example, I don't want anyone to be able to type in DELETE * or any other kind of SQL statements in a text box to ruin the DBA's day.-Nothing to see. Move along.
I have a vb.net application which does some processing. This processing can take a while. The application doesn't respond until the processing has ended and then it handle all events (such as click on buttons) that the user has done during the processing. I'd like to add a "Stop" button so that the user can stop the processing at some point. How can I do that? Could threading the processing (which is done in a function of the application) be a possible solution?
I tried to add a button which change a boolean value and putting the code of the processing function inside a while statement based on that boolean value. However it doesn't work because the click event on the button is processed only after the end of the processing.
Ok, so the PDF problem was traced back to when I would close the test build. When I would close my app via Me.Close the Adobe.exe was still an active process.
I have several forms that include multiple PDFs. I need to ensure that the Adobe.exe process is terminated during the exiting of my applications.
I have this code within a button: If TextBox1.TextLength = 3 Then MsgBox("Please enter 3 numbers followed by a letter. For Example 001A")TextBox1.Text = "" Me.Refresh() End If Although if the user enters 3 numbers only, I want the rest of the code in the button to be ignored so that it doesn't proceed.
I know the title of this thread is a show stopper for a lot of us . But what I want to do is stop two services from running for a period of time then restart them. I know I can do this from the command prompt by using net stop servicename then restart with net start servicename. I need these two services stopped to do some work on the database. I do this manually right now and want to automate the process. I tried process.start with the command net stop but that did not work out. If I try the Process List I get the process running but not the services.