While Loop Causes The App To Go Slow?

Jan 8, 2010

I have a simple code that looks up a text file, reads the line of text, splits the string by semi-colons and then posts the results.

After it has done this, I have created a really simple while loop to waste 10 seconds before going for it again.... here is the code:

Private Sub checkTemps()
While Abort = False
Try

[Code]....

View 2 Replies


ADVERTISEMENT

Setup Timer To Slow Down For/Next Loop?

Jun 20, 2009

I have a For/Next Loop that adds values to column in a DataGridView. I want to set up a timer to slow the For/NExt Loop down. So the DGV will load and then the user will click button on the form and the DGV will have numbers added into all the rows of a specific column. For simplicity, assume I want to load the numbers 1-100 into each cell and I want to see each number as its passed.

I am not sure how t set up the time to work with the For/Next Loop in the Button1_Click event. Do I have to use a Timer1_Tick event as well and somehow associate it with Button1_Click event?

Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

[Code].....

View 9 Replies

Sql Server Loop Running VERY Slow

Apr 20, 2011

1. load gridview from an uploaded excel file (this would probably be about 300 records or so)

2. compare manufacturer, model and serial No to my MS SQL database (about 20K records) to see if there is a match.[code]is there a better way to find a match between the two?

View 3 Replies

Each Loop With DataRow And DataRowCollection But It Gives Output Very Slow?

Jan 4, 2010

I fill data in C1FLEXGRID from DataTable using for...each loop with DataRow and DataRowCollection but it gives output very slow. How can I solve it.

View 1 Replies

Loop Through Dataset.Datatable Slow Performance In .Net 1.1?

Mar 16, 2009

I have a program in where I need to loop though the entire dataset.datatable. I takes a long time. What is the alternative I can use to do the some job but faster?

View 4 Replies

Slow Loop Performance While Updating Data?

Jun 8, 2012

In my winform application, I have 2 datatables, both contains 37000 rows. Table 1 has 171 columns and Table 2 has 4 columns. A While loop runs to update values in Table 1 from Table 2 for 4 columns. A For loop runs inside While twice to update values. It takes more than 5 min to do so. which i think should be a task of 5 seconds.

Columns being updated are:
Int64 - 1 Columns
String - 1 Columns

[Code]....

View 2 Replies

Evaluates Loop Condition In Do...Loop Statment To Determine Whether Loop Instructions Should Be Processed

Mar 14, 2011

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?

See below.

Option Explicit On
Option Strict On

Imports System.Globalization

[CODE]...

View 2 Replies

Countdown During Loop - Label To Show How Many Cycles In Loop Are Left

Mar 9, 2011

I know I am missing the obvious. I would like a label to show how many cycles in loop are left.

[Code]...

View 5 Replies

Make Loop In Program And Calculate Time Taken To Complete Loop?

Nov 23, 2011

I am constructing a program, i am new to Visual Basic, but i have past programming experience. I was wondering if anyone knew how to form a loop that could...lets say calculate the answer when two numbers are added together,and it would repeat this thousands of times, etc. And if there is a way, would it be possible to calculate the time taken to complete this loop.

View 5 Replies

Getting Loop Through Adding Each Result Without A MessageBox Stop In Each Loop?

May 3, 2010

I have written a function that gets the alexa ranking of a given url, now this function works perfectly but I want to loop through a ListView of urls and grab the alexa rank of each item (url) with my function.The code works great if I put a MessageBox in the loop to test that the function is returning a value but when I remove the MessageBox the loop does not work.I need it to loop through adding each result without a MessageBox stop in each loop.

vb
For Each Item In ListView1.Items
Dim result As Integer
result = GetAlexaRank(Item.Text)

[code].....

View 12 Replies

Create A Loop To Loop The Locations Of The Platform?

May 31, 2010

So I made a simple patform game where the player has to jump quickly while the platforms move to the bottom of the screen, as to not touch the bottom of the screen. But, I need to know how to create a loop to loop the locations of the platform. This means that after twenty or so platforms, the same platforms come up again, so that the player will have an "endless" game. I've declared all the platform's locations relative to the location of the first repeating platform:

[Code]...

View 1 Replies

VS 2008 Program Works Before Loop But Not After Loop

Aug 11, 2009

I assigned an integer as 1, and looped my program using:[code]I can recieve the packets without looping, but once i loop, i receive nothing.

View 29 Replies

DownloadStringAsync Too Slow

Feb 1, 2011

I make a program to check certain website.

The idea is to do webclient.DownloadStringAsync thingy and then wait till each one is solved. So like multi threading application.

The program itself is a single thread.

Well, when I loop 400 times it takes too long. Every time I press pause the program in debug it stop at this line[code]...

View 19 Replies

How To Slow Down SendKeys

Oct 21, 2011

Currently, the sendkeys command is too fast for a game called "Minecraft" to process. Here is the code I got currently:

for the button:
appactive("Minecraft")
timer1.enabled

[code].....

View 14 Replies

IDE :: F1 Very Slow To Load?

Oct 13, 2009

Something happened to my VS2005 setup and now the first time load for F1 can take a full minute to load. I think the last significant thing I did was install an add-in for ESRI ArcExplorer. I uninstalled that add-in but help is stil VERY slow to start.Does anyone recognize the problem and have a simple fix?

View 2 Replies

My ExecutenonQuery Too Slow

Jun 9, 2011

Is there any way that i can be able to get the ExecutenonQuery to Execute faster. Am using it to run mysql queries that have joins from diffrent tables. As I have come to notice, the user has to wait a while before the statement ExecutenonQuery can be completely executed.. is there any way that I can get it to execute faster?

View 2 Replies

Slow DB Access ?

Sep 3, 2011

Im using VB2010 professional edition and Ms Access 2007 DB. Main form contains a button which accesses database, fetch results in textboxes and update database. But sometimes it takes almost 40seconds to fetch and sometimes it fetches immediately. Couldn't understand any pattern for this. The table in the database contains 8000records and Main form has 3000 lines of code.

View 2 Replies

VB Dot Net Too Slow Given That It Uses MSIL?

Oct 27, 2010

We have old VB6 code, and now that Windows 8 is coming along, we are worried that it won't work. So we have to decide what to port it to. VB.net would seem to make sense, but since it compiles to an intermediate level, its not as fast as programs that compile straight to assembly language. Another choice we found was "Power Basic" which is supposed to be much faster that VB.net.

I happen to like various features of VB.net such as the GUI editor, and intellisense and so forth, and so I'm wondering - is there some way to get around the MSIL (intermediate level) factor in slowing the language down?

View 1 Replies

VS 2010 Slow IDE?

Jul 27, 2010

its' only me, or is VS2010 really so slooow? This taking 50 seconds to open vs2010, 30 seconds to change from an small project to other small project.as a comparation, in the same machine I can open three different vb6 projects, each one in one different vb6 instance and each one takes "only" three to five seconds. of course I can maintain all the three instances opened all the day, sutching from one to other, debugging, changing, even generatin' exe files, without noticeable penalties.machine is Dell Vostro 1700 4 GB, two internal disks, Win Vista business, Intel Core 2 Duo T 7500 2,2 GHz. two years old.

View 4 Replies

.net - Slow Down Console Speed

Aug 7, 2011

I have this program, which prints a sine wave but it's too fast, how can I slow down the console's line printing speed?

[code...]

View 2 Replies

.net - System.net.mail Is Too Slow?

Mar 12, 2011

am using system.net.mail to send email as shown below, but its too slow. it takes about a minute to send, whats wrong with my code. Am calling the code below in backgroundworker_dowork. is there a faster alternative, maybe free or open source code

' send the email '
Dim smtp As SmtpClient = New SmtpClient()
Dim mail As New MailMessage()[code]............

View 2 Replies

All VB Programs Running Very Slow?

Jul 12, 2009

All of a sudden all vb programs running very slow in XP...... nothing has changed.I took the vb2008 complete out, and reinstalled...... and no difference. other programs like excel run as before, just all my vb2008 programs are really slow.....

View 2 Replies

App Runs Slow On Other Machines?

May 24, 2009

Basically i have designed an app that runs smoothly on my desktop PC (3GHz processor, 2GB RAM, Windows XP Media Centre (SP3)).

When i put the app on my laptop(1.4GHz processor, 448MB RAM, Windows XP Home Edition (SP2)) it runs really slow and is unusable.

I have tried deploying the app and also just copy the whole folder to my laptop and run the apps *.exe from the bin/debug folder, but it has the same results.

I have tested it on higher spec machines with 2GB RAM and they also replicate the slowness, so i'm at a loss as to why it behaves 100% on my desktop PC, where i have Visual Studio installed but not on any other machine.

My question is if little differences like operating system, RAM, service packs, VS installation, etc, make apps run differently on different machines.

View 4 Replies

Application Runs Slow

Jul 22, 2009

I have designed an application just like it is an Excel table. By changing each textbox the application runs a huge amount of vb code and it takes time.

E.g. you want to enter a three digits number it takes from two to four and sometimes more seconds for ech digit to enter. That`s really embarrassing.

View 11 Replies

Application Very Slow After 1 Hour Of Use

Jan 23, 2009

I have a problem with a application, when i start the program the speed is ok.after 1 hour of use the prohram go very slow.

View 7 Replies

Background Image Slow Down My App

Mar 14, 2009

I didn't think that setting a background of a form may slow it down seriously, but it's real now

View 3 Replies

Code - Runs Too Slow ?

Jun 5, 2011

I've got a vb.net 2005 form that calls a stored proc to load a combobox with eligible sales reps. There are approximately 40k sales reps available...I know that's a lot, but that's what I'm dealing with. I'm trying to figure out why it's taking this form 15 seconds to load.

Here's my code:

Want to load this in the most efficient way possible given the HUGE amount of data that my client is wanting to see.

Can you help me? :confused:

View 1 Replies

DB/Reporting :: Slow Connection Using ADO?

Apr 11, 2008

i know this question was asked a couple of years ago by TheMinistered .. but i cannot find an answer, and i have exaclty the same problem (using both VB6 and VB.net 2003) :

When I attempt to connect to a remote SQL server via ADO it takes almost 20-30 seconds before Open returns. I don't know if it's something I'm doing wrong... here is my connection string/code:

Private Sub Class_Initialize()
Dim strConnectionString As String
Set m_objConnection = New Connection

[Code]......

View 5 Replies

Function Call Too Slow

Oct 13, 2009

I'm writing a application that need to execute a certain code several times a second. At first, i wrote a Function and used it. But it was too slow... So, using Stopwatch i started measuring the performance of my code. And apparently it was from the funcion call. So i wrote a example code, just a simple loop. And using the Stopwatch it took 4E-6 = 0.000004 seconds. Then i copy and paste the loop code, into a function and made a call to the function. it took 0.03 seconds. It was 7500 times slower with a function call. Why using a function call can be so much slower?[code]...

View 9 Replies

GDI Path Calculation VERY Slow?

Feb 6, 2011

I have the following code to manipulate the points in a path before drawing it.

Private Function CurvePath(ByVal inputPath As GraphicsPath) As GraphicsPath
Dim tmpPath As New GraphicsPath
Dim newPath As New GraphicsPath

[code].....

View 2 Replies







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