Loop To Add Figures?
Nov 25, 2011
How can I add a loop to this sequence to make the program give a total of the figures in the domestic and international columns when the word "ALL" is typed into the month textbox,instead of a number. The domestic total should go into the domestic textbox, the international total should go into the international textbox and the total of the domestic and international should go into the companytotal textbox.
'Basic Info:
'Month Domestic International
'1 100,000 150,000
[code]....
View 2 Replies
ADVERTISEMENT
Nov 25, 2011
How can I add a loop to this sequence to make the program give a total of the figures in the domestic and international columns when the word "ALL" is typed into the month textbox, instead of a number. The domestic total should go into the domestic textbox, the international total should go into the international textbox and the total of the domestic and international should go into the companytotal textbox.
[Code]...
View 1 Replies
Nov 24, 2011
Does anyone know why the domestic figure is showing up in both the domestic and international textbox? And why the totals of the domestic and international figures keep coming out to zero? [Code]
View 4 Replies
Mar 18, 2012
i was just wondering how i would do this task. It seems fairly simple but i dont no how to to do it. In my system i have a table where i have a total figure of the stock. what i am trying to do is when my saler order takes 5 i want it to project this in my overal amount. How would i do this. I am not asking for codes just a method of doing it
View 6 Replies
Jun 15, 2007
This DEMO will stop itself after a short while,Warning to anyone with photo-epilepsy, it is a bit flickery!!Do you see the peaks as moving clockwise or anti-clockwise from the top?!!ow i am looking to do this without hogging 100% CPU time in a DO LOOP.I would also like to use SetPixel but that is only available with a BITMAP.
View 1 Replies
Jun 4, 2009
Below is my code which is almost complete. The only thing that I need to do is set up an autoupdate feature that keeps an ongoing average of each temperature that I enter in. I have no idea how to do it!
Option Strict On
Imports System.Convert
Imports Microsoft.VisualBasic.ControlChars
Public Class Form1
[code]....
View 1 Replies
May 9, 2012
I'm trying to do something that is turning out to be out of my league at the moment. I need to draw geometric figures. These geometric figures have all the coordinates of their corners. Say I have a trapezoid, and I would want to draw it. The drawing would be done in a picturebox or a panel or a groupbox (some part of the form where only the geometric figure will be).
I saw the method on how to do that Here and that's exactly what I'm trying to achieve, but there it's drawn on a newly created form, and I need it in a picbox, panel or groupbox as I mentioned above. I also need the drawn figure to be at the center of the picbox/panel/groupbox.
The coordinates of the lines should be like (xa.text,ya.text) to (xa.text - xb.text, ya.text + yb.text) if I'm not wrong for the first line of the geometric figure and so on.
View 3 Replies
Nov 22, 2010
I am trying to input a text file of figures into a 2-dimensional array. I want to do this so I will then perform percent changes on the respective columns. The text file contains columns and then numerous rows for each columns each number is separated with a tab. The text file looks something like this.
2.2 5.5
3.7 6.3
9.2 9.1
So I need to be able to input the text file, turn it into an array and then find the total percent change. From 2.2-3.7-9.2
View 8 Replies
Oct 16, 2009
I'm currently trying to write a really simple game on which the player has to pursuit some figures on the screen. Since i'm just writing the prototype version i'm using a Panel wich i redraw 1000 times per second. Now, i want that every level is similar but not the same as past level, so i created a Level Class that contains the game objetcs of Player Class and the Figure Class, wich are the ones that have all the movement subrutines. So, with a Timer, 1000 times per second, i get the input from a joystick, pass it to the player objetc and update the position of the figure object. All this stuff is reported to an internal Panel that every level object has, wich i refresh and then pass it ByVal to the panel that the player actually sees. The problem i have is that after the first level ends, when the second level starts running, i can see the last frame of the fisrt level flashing behind the figures and it makes the game run a bit slower after every level. I tried keeping a copy of the inicial state of exterior panel and use it to clean the one i'm using on the levels but it didn't work...
View 11 Replies
Sep 14, 2009
Here's my situation: I'm tryring to build a very simpe minigame in which the player has to pursuit and catch certain figures on the screen. This figures are currently showed as images on PictureBox wich i pass ByRef to some classes where the movement subrutines are. I have all the graphics in PNG, with transparent background, format and they look fine on the background, but when 2 or more of this figures are over the same place on the screen every PictureBox covers the underlying figure, so all i can see is one figure over the background.I was wondering if theres a way to solve this... Maybe using more powerfull libraries or something like that.
View 4 Replies
Oct 19, 2011
I'm doing a web application in which the user must make a series of figures such as rectangles, text boxes and lines, Is something like like google docs draw
View 2 Replies
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
Nov 25, 2009
I am working in a point of sale system in Vb express 2008. I want to convert the Amount in Figures to Words like: How to conver the amount of $ 1,550,325.45 to Amount in words as DOLLARS: ONE MILLION, FIVE HUNDRED FIFTY THOUSAND, THREE HUNDRED TWENTY FIVE AND FORTY FIVE CENTS.
View 2 Replies
Nov 25, 2009
I am working in a point of sale system in Vb express 2008.I want to convert the Amount in Figures to Words like:How to conver the amount of $ 1,550,325.45 to Amount in words as DOLLARS: ONE MILLION, FIVE HUNDRED FIFTY THOUSAND, THREE HUNDRED TWENTY FIVE AND FORTY FIVE CENTS.Please advise how to code for that in Vb express.
View 5 Replies
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
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
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
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
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
May 29, 2012
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.
[Code]...
View 2 Replies
Sep 10, 2009
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?
[Code]...
View 5 Replies
May 9, 2011
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
View 4 Replies
Nov 18, 2009
How do you convert a loop to a for loop
View 5 Replies
Sep 29, 2011
How would I convert this Do While loop to a For...Next loop? I can't figure it out.
intCount = 0
Do While intCount < 50
lstOutput.Items.Add(intCount)
intCount += 1
Loop
View 1 Replies
Jul 21, 2010
Dim count As Integer
For count = 1 To 10 Step 1
Dim But+count As New Button
myButton+count.Width = 100*count
[code]....
Dim But+count As New Button => How to make it work
View 2 Replies
May 25, 2010
I'm slowly learning about loops. I have a couple of questions
1) When a condition is being tested.. what does that mean? I don't understand the "condition" word.
2) What is the difference between a loop that never ends and a loop that ends?
I have the code for the loop that ends and the loop that never ends. I can see the difference in the code, but I don't understand what is making it different. Here is the code below.
[code]...
View 1 Replies
Mar 15, 2012
I use the following code to add a row to an existing table
Dim newLineRow As DataRow = dsAccountDetails.Tables("Ph").NewRow()
newLineRow("Service TN") = "test"
dsAccountDetails.Tables("Ph").Rows.Add(newLineRow)
When I run the code it adds a single row to my table just like I want it to. However, when I put it in a loop it errors and tells me that the row already exists. The number of rows is always changing and I want to build the table from arrays. Why isn't the following working?
Dim a As Integer = 0
Dim b as integer= 5
For a = 0 to b
dsAccountDetails.Tables("Ph").Rows.Add(newLineRow)
Next
View 1 Replies
Aug 28, 2010
Currently, lets say that I have this code:
While r <> "HI"
r = RandomStringGenerator(1)
time = time + 1[code]....
how can I make it so that i can say basically this:
While r <> "HI" Or While r <> "BY"
r = RandomStringGenerator(1)
time = time + 1[code].....
But it still doesn't work! What's up with this?
View 1 Replies
May 12, 2009
Why does any app I make use 50% CPU while in a loop, even if the loop is doing simple evaluations, I've added Application.DoEvents() which stops the application hanging, but 50% is rediculous, what gives?
View 10 Replies
Mar 22, 2011
I have got this far and if you run it, it will do what you ask. Now when I type in 99999 or -99999 it will not end. Can someone tell me what I am doing wrong. I am suppose to loop until a sentinel value of -99999 is enter for previous meter reading.[code]...
View 2 Replies