I have an extremely simple for loop listed here and I've been getting incredibly whacky results. Right now I'm getting a System.OutOfMemory Exception. When it did run, I was getting results like this, "1, 100, 0, 200, 0, 200, 100, 1, 300, 100", where it continues for the whole loop. It doesn't matter if I do this or do a for each loop with an instance of what I'm counting, like a DataGridViewRow when I'm iterating through it's rows. I can't figure out what is wrong. I've went to a completely different computer with a completely different installation of Visual Studio (fresh install) and it still doesn't fix the problem. Now I'm getting that out of memory exception.It's a basic Windows forms app with two datagridview controls. A DataSet that has two tables loaded by table adapters. Data is from a SQL database, two different tables. I'm iterating through the rows in one datagridview control in order to update text in it with info referenced from the other datagridview control. [code]
I am using Excel 2003 and I am wanting to create a simple macro in order to run a for loop and then have the information output the numbers to cells.
Sub ForTest(i As Integer, j As Integer) For x = i To j y = Rnd Next x End Sub
This is my code. Now how can I print my x values to the A column and print my y values to the b column so that they line up as a pair of coordinate points.
I am an intermediate programmer with a basic understanding of VB.NET, however, I am having a problem with a special loop named "recursive".
To select the 3rd subitem/node inside a control named "CrumbBar", I have to: CrumbBar1.SelectedItem = CrumbBar1.Items(0).SubItems(0) CrumbBar1.SelectedItem = CrumbBar1.Items(0).SubItems(0).SubItems(1) CrumbBar1.SelectedItem = CrumbBar1.Items(0).SubItems(0).SubItems(1).SubItems(2)
And go through all items, but I need to do this in a LOOP. And I don't know how many nodes I will have to go inside. So I wanna know how can I loop the above code?
I think for you my problem is very simple..I have done the same program in console mode without problem, now i try into windows form...
I generate by random 2 number A&B I multiply them and I will compare it with the result in my textbox3
if it the same as the computer has calculated il will show you congratulation, however i will say try again
I have a problem to calculate the sum, A&B are well generated but nothing in Calc Result
When Calc was working when I write nothing in the textbox3 and i click on Verify it show the msgbox congratulation.I'm looking just for this step, I've fixed the other issues And another things When It's right I would like to random another number for A&B after closing the msgbox, how can I processd ?
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?
Trying to make a simple browser with some simple addon's. What Ive done is setup a menu(forum) for the user to enter their email providers web address and it will save it in a xml file. When they click on the email link, it should load the email xml iformation and place that info in the tb_html.text and navigate. I keep getting a null exception and im not sure what going on here. Here is the code:
Browsers: Private Sub btn_Email_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_Email.Click 'Load Action Dim SavedEmailObj As Storage
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.
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)
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:
I have this little application that runs a SQL query works great, now I want to have a Start Button run the and display results then System.Threading.Thread.Sleep(300 * 1000) for 5 min then run again and display results and loop till I buttonstop_click. unsure if the sleep is the best method.
I am new to VB programming. I have the following code. When I execute my program only the last value from the loop is displayed in the label. I do write my code so that all of the values (years 1 to 5) show up in the label?
I'm completely new to working with more than one thread at a time but I've been reading up on backgroundworker quite a bit today. I get the general idea and think I could use it ok if it weren't for the fact I have a loop in a loop and I don't think they could be run inside a single thread together
i want to desing a simple application which will be developed on a pc but will work on a MAC.Now im guessing that if i make an app in pc vb net it will not work on a mac right? So what if i design a web application. could the mac user then use it as it is web based?
I have developed a form for Windows VB.Net that uses a number of text boxes that are indidivually bound to separate columns in a database. When one of the textboxes (let's call it XYZ.Text) is bound to the database, it prevents the data from any of the other bound text boxes to enter the database. When the binding for this one text box (XYZ.Text) is removed, then all the other text boxes work fine.
how to build a simple calculator in VB; i got the interface with buttons and text box alredy and i figured out how to put more then one number using buttons alredy(Disp.Text = Disp.Text & 1) , Looking at the windows calc, how do you store the number u just entered into a text box and alowe user to enter another to performe calculations, what code should i use for equal button and etc.
There's a number of postings about IMAPI in .NET, including these:
[URL]
But I can't say they're straightforward. First link looks good, though its C# WinForms realization doesn't allow simple re-using in VB.NET project without conversion.I only need to burn a list of files to a CD/DVD and that's it. Any thoughts? Freeware/open-source is preferred.
I have loaded my database with one table under "Data Connections" in the "Server Explorer" pane.What is the standard / best-practices way to handle a simple query in a VB ASPX page?
My left <div> would be a set of form elements to filter rows, and when the button is clicked, the main <div> would show the columns I want for the rows returned.
Note: Answers in C# are okay too, I'll just translate.
I am trying to get a query to work with Visual Basic 2010 Express addition I have pasted the code below but it just errors out with to many arguments I have taken this sample from a reference book but cannot get the darn thing to work. I have looked all over the net and Microsoft for a solution but still no go if any one can help it would really be great. BEP
Private Sub FillBypeeps1ToolStripButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FillBypeeps1ToolStripButton.Click
I'm wondering, is it possible to create a (REALLY) simple web server in VB.NET? I may be wrong, but don't you essentially just need a listener for port 80 and a way to send pages to the client?