Different Results On Subsequent Runs

Jan 6, 2012

I have made a program that minimizes a function of several variables. My question is why I keep getting diffrent results on subsequent runs? The inputs of all runs are same.

View 3 Replies


ADVERTISEMENT

Filling DataGridView Goes Differently On Subsequent Runs?

Jan 3, 2011

I have written some code in a form which is shown via ShowDialog from a different form. This code fills a DataGridView with data from two tables in a dataset, one through data binding, and one through more manual means. The latter part runs, or more accurately, fails to run in the same way if I call this form in the same way subsequently but without stopping debugging.

View 2 Replies

Pause Program And Subsequent Code?

Oct 4, 2008

I am not sure how to make my program pause in the middle of execution, waiting for a certain period of time to pass BEFORE the next lines execute. I have already used System.Threading.Thread.Sleep(int) but this pauses the waits but still executes the subsequent code. If I were to:Private Sub Hello()System.Threading.Thread.Sleep(int)MessageBox.Show("Hello")End Sub* Time in milliseconds.This would NOT stop the execution of the MessageBox for int seconds, the program continues to run???How would I pause the code execution where I want, and for the time I want?

View 10 Replies

OnSelectedIndexChanged Not Working First Selection, But Will On Subsequent Selections?

Mar 24, 2012

I have a listbox in a datagrid that is supposed to update upon selection change, and it does, but not on first try. only after it has posted back, after the first time it is clicked will it work as intended.Here is the front end portion of the datagrid with the listbox.

<asp:TemplateColumn HeaderText="Qty">
<ItemStyle HorizontalAlign="Center" Wrap="False" CssClass="grid" />
<HeaderStyle HorizontalAlign="Center" ForeColor="Black" Font-Bold="true" CssClass="grid"

[code].....

View 1 Replies

Delete Subsequent Duplicate Rows In A Text File

Jun 30, 2010

I'm going nuts with this. Obviously I cannot open the reader ard writer on the same file simultaneously.

[Code]...

View 1 Replies

Events - The Selection In A Box Can Affect The Possible Choices In Subsequent Boxes

Mar 10, 2009

I have a project that has several combo boxes on one form. The selection in a box can affect the possible choices in subsequent boxes. Right now I am using SelectedValueChange to fire the code that loads the choices in the later boxes. There are a number of possible events that I could use:SelectedIndexChangedLeaveLostFocusTextChangedI was wondering if someone could give me a rough idea what the differences are between these. Is there a 'best' evnet to use?Also, I find that most events work when the choice is made with a mouse click but if you click in the box and type in a value an event does not fire. How can I program for the case where the user enters a value by typing it in instead of choosing from the drop down list?

View 3 Replies

Finding The Subsequent Occurrences Of Character And Separate As Substring?

Feb 22, 2011

I am developing an application proj on it.. In that, I want to separate charaters of the string which is of following stream, 18 Feb 2011 06:05:24 0601 110218055515,3,26;9948;9948;9947;9951;9956;9954;99 61;9958;9965;9967;125672N0801272E;110218055550; In this I want to separate as, Mail recieved time = 18 Feb 2011 06:05:24 msg recieved time = 110218055515 msg sent time = 110218055550 Position = 125672N0801272E water level 1 = 9948 water level 2 = 9948 water level 3 = 9947 water level 4 = 9951 water level 5 = 9956 water level 6 = 9954 water level 7 = 9961 water level 8 = 9958 water level 9 = 9965 water level 10 = 9967 I am only aware of IndexOf and LastIndexOf methods, and these methods are used to find the index of first and last occurence character position, but I want to split the string in subsequent characters too..

View 2 Replies

HttpWebRequest - Using Cookies Obtained From Login To Do Subsequent Requests

Nov 27, 2010

1) How do I use cookies obtained from login to do subsequent requests? e.g. Login to a forum, then use the cookie obtained from login to access User CP and change settings.

2) How do I parse HTML via HttpWebRequest? Does mshtml work with HttpWebRequest? If so, how do I work with it? I thought of downloading the source code of the page I'm requesting into a richtextbox and do my stuff from there, but it sounds kinda impractical to me since I have to use regex to get the innertext of stuff (or not?).

View 7 Replies

Dynamically Resize Labels And Position Each Subsequent Label A Perdetermined Distance From The End?

Sep 24, 2010

I am trying to dynamically resize labels and position each subsequent label a perdetermined distance from the end of the label that was just generated. My code looks like this:

[Code]...

View 1 Replies

Parsing A Text File In Order To Extract Data For Subsequent Calculations?

Oct 21, 2010

I am using Streamreader to read a text file containing data such as the following:

IN;SC;PU;PU;SP1;LT;VS10
IN;SC;PU;PU;SP1;LT;VS10
PW5;PU4179,27448;PD4179,29951;PD3244,29951;PD3244,30286;PD5494,30286;PD5494,29951;PD4555,29951;PD4555,27448;PD4179,27448;

The final goal is to use the numbers next to the PU and PD characters to perform specific calculations.

Essentially, I think the code needs to do the following:

1. Read each block of characters ending in a ";"

2. If the block commences with anything other than PU or PD, discard it

3. Extract the numbers in such a way that calculations can be performed. The following is an example:

x y
PU4179,27448;
PD4179,29951;

[Code]....

Essentially, there will be hundreds of these rows and I will need to sum up the deltas so that a specific formula can be applied.

I have tried doing this a number of ways but each seem very inefficient (using text boxes to store/swap data and creating additinal text files are 2 methods I have tried) and so I'm looking for some direction.

View 3 Replies

Show The Final Results Instead Of The Results Real-time

Sep 28, 2010

I have a form that allows users to select file and then it reads the contents, parses the data and then executes a sql insert statement to add it to a database. What I am having issues with is showing real-time results. Currently, I have the import operation take place on the import form within the OnLoad event. The problem with this is it only shows the final results instead of the results real-time. Is there anyway to do this without creating a seperate thread and delegates?

View 1 Replies

Getting Subsequent Filters To Not Affect Original Filters?

Sep 21, 2011

I'm designing a form wherein a datagrid is being filtered from numerous controls.

The issue im having is each filter overrides the previous one. Just wondering the best way to approach this problem.

Heres a snippet of my

Private Sub MakeIDComboBox_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MakeIDComboBox.SelectedIndexChanged
Sheet1BindingSource.Filter = "Make like '" & MakeIDComboBox.SelectedItem & "'"
End Sub

[Code]......

View 4 Replies

Program - Results For The Quit Command Input Of -999 But Rather Just To Quit Without The Results?

Jul 22, 2009

How can I make this program not to give me the results for the quit command input of -999 but rather just to quit without the results?

Sub Main()

Dim TempIncelsius As Double
Dim TempInput As Double
Dim Formula As Double

[CODE]...

View 4 Replies

A Timer Just Runs Once?

Feb 13, 2010

I wrote an application that have two timers, one of them (timer_poll) when the ticks event i change the enable to false in order to execute a code. this code writes an information in a COM, and after recieved the information from the COM from a Funtion I change the Enable property for the timer_poll to enable again but it have neve run again.the timer_poll_tick_1 does not start again, i activate a breckpoint, I can confirm that the timer_poll.enable=true because i put a button on the application that on its click event it shows me tha properties of the timer_poll, like this:

MsgBox(
CStr(timer_poll.Interval) + "|" + CStr(timer_poll.Enabled))

here is the code of the timer_poll_tick_1

Private Sub timer_poll_Tick_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles timer_poll.Tick
timer_poll.Enabled =

[code]....

View 1 Replies

App Runs On Computer But Now Others?

Apr 30, 2010

I've been working on this application for a few days now, and have had people beta testing it day by day. well last night I did a pretty big update on it, and release the beta to a few people, all with different architectures and other devices, and now it wont run on any of there computers. It begins to load, and then just closes. No errors, hanging, or overflow. the max it gets at in ram usage is 27k. No windows load either. They only thing that is a reference is the itunes sdk, which hasnt changed since I started making this app. I've checked the form load, and nothing there is causing it to end. I even commented out all the code I added last night, and still nothing.

View 11 Replies

.net Application When Close Still Runs?

Nov 29, 2011

i created an .exe application with vb.net 2010 , my problem is when i run the application and then close it, it still runs in processes . why does this happens ? and how can i fix it?

View 1 Replies

App Runs In IDE But Error From Release Exe

Oct 11, 2010

This is just a test app I'm using as a training tool.It connects to a MS Access 2007 db.It gives me no error when I run it from the IDE but when I run the exe from the in elease it gives me this error,Failed to enable constraints.One or more rows contain values violating non-null, unique, or foreign-key constraints.I've found the relation thats causing this but, the data in the tables seems to be fine.No missing Primary keys, no duplicate primary keys, there no extra foreign keys.

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 Only Runs For A Few Hours

Mar 17, 2011

I have 2 applications, 1 that goes out and grabs data every minute and inserts or updates that data depending on a time interval into sql tables, the other 1 goes out at the top of every hour and grabs hourly data. Both of these applications run perfectly fine when they are compiled and published to run on my development PC, both do xml validation and check for duplicate data prior to any sql insert so I know it's not getting SQL exceptions.

When I move them to the Production Server the 1 minute application will work for a few hours and then freeze up and stop working.The hourly application half the time won't work at all.

I've made sure to include a local copy of the references when I compile/build and publish the application. I've made sure the Production Server is up to date with the latest .Net framework.

View 1 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

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

Create App That Runs On Startup?

Apr 20, 2011

I want to create an application that once installed (this will be distributed software, so there is no point running code that injects stuff into the registry and creates the the auto startup stuff after the install) , runs on start up on windows for all users, and creates a system tray icon. The following is Visual Basic code that creates a registry key entry, is this the way to go?[code]...

View 4 Replies

Detecting When A New Process Runs?

Aug 10, 2011

How can i detect when a new process starts (Any process)?

View 13 Replies

End A Process If It Runs More Then Like 10seconds?

Jan 31, 2009

i wanted to know how i can end a process if it runs more then like 10seconds. I am coding a tool that runs a Perl Script but if the Perl Script doesent work then it just hangs at 1 point so it doesent go further what i wanted to do is tell the Program to end the Process after 10 Seconds.

Dim proc As New Process
For Each names As String In lb_1.Items
With proc.StartInfo

[code]....

View 6 Replies

Have A Timer That Runs Ever Minute?

Nov 23, 2011

I have a timer that runs ever minute, but the timer waits the full minute to run the code in the timer. Can I have the timer run the code when it first starts, then update every minute?

View 3 Replies

Loop Only Runs With Msgbox?

Jun 13, 2012

I have what might just be the most retarded problem ever...the thing is, I have this loop, and it runs just fine(except for the boringness it is to run it) if I use Msgbox("whatever") after some of its lines. But it won't run otherwise...I guess it has to do with the time my local server takes to awnser, but I tried System.Threading.Thread.Sleep() up to 10000 and nothing worked...even tough it did on msgbox's which I went trough faster than those.I am building a very basic local program to test my website for vulnerabilities,a s you can probably figure by the code.Also, how can I clean Webbrowser1 cookie's?

Code:

Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim FILE_NAME As String = "C:\Users\Myname\Desktop\list.txt"
Dim TextLine As String

[code]....

View 1 Replies

Make A App That Runs At Startup?

Apr 18, 2010

i tried to make a app that runs at startup. So i tried with regestry (regedit) but you guys know vista...so it craches. Another thing i tried to do was: to copyfile, Application.Executablepath, (Too) c:..autostart.exe.Works! it succsesfully copied itself but when i open the copied program i just got errors..why canīt i copy "myself"?

View 17 Replies

New() Runs Twice Inside A UserControl?

Apr 6, 2010

I am putting together a simple multiple column listbox. I call it Gridbox.The intent is to make a lightweight grid control mainly for displaying lists with columns. Minimal cell access i supported.

I wrote it with an IntegralWidth as well as an IntegralHeight.Of course I cannot support the Integral Width if there isn't at least one column in the Columns collection when the control is initialized.

To this end I call a Column Add() method in the UserControl New() Event.
So that one Column will be present when the control is placed on a form.

For some reason the New() UserControl Event is firing twice. So I end up with two columns not one.

I was under the impression that New() only fired once when the control was intialized. Where would

I put the code that creates the desired column if not there?

View 11 Replies

No Code Runs After ExecuteReader()?

Aug 3, 2011

I am using Microsoft visual basic 2010. I am using the following code to connect to a local access database. After the line myReader = cmd.ExecuteReader () no code runs. I am not receiving an error message.

Dim connectionString
As String =
"Provider=Microsoft.ACE.OLEDB.12.0;data source=C:UsersmikeDocumentsFCE_Database.mdb"

[code]....

I have used this method to connect to the same database multiple times in the same program without a problem I've also tried using OleDb with the same result.

View 20 Replies

Prevent Same Applcation Runs?

Oct 8, 2009

Let's say that there is a little icon on the windows desktop which is called "HR". The user started the application to input a new employee.After he came back from lunch he tried start the application again even though he did not logout from the application.How do I prevent

View 3 Replies







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