Sentinel Controlled Do While Loop?

Oct 20, 2009

I have an issue with my DO While loop (it has to be a DO While loop). It is supposed to loop until a value of -99999 is entered for the value of previousReadiing. The program works, and it will stop after -99999 is entered, but only after it goes through the rest of the loop.How do I get this to end rather than have to finish through the other input statements and calculating again?This is homework so I don't want the answer, but can I get a nudge in the right direction please?

Module ElectricBill
' program to compute a consumer�s electric bill. It will calculate the bill for one or more customers

[code].....

View 7 Replies


ADVERTISEMENT

IDE :: Method CalculateCharges - Sentinel Value ?

Feb 12, 2006

Here is the problem I am working on. It asks me to use the method CalculateCharges, but I don't fully understand how to do this or how it works. I would be grateful for any input.

Lab Problem III

A parking garage charges a $2.00 minimum fee to park for up to three hours. The garage charges an additional $0.50 per hour for each hour or part thereof in excess of three hours.

The maximum charge for any given 24-hour period is $10.00. Assume that no car parks for longer than 24 hours at a time. Develop a console program that calculate and displays the charges for each customer who parked a car in this garage yesterday.

You should input hours parked for each customer. The program should display the charge for the current customer. The program should use the method CalculateCharges to determine the charge for each customer.

The program should input as Double the hours parked by each customer. The program should continue asking for new customer until sentinel value is entered for hours parked.

View 1 Replies

VS 2010 Sentinel HASP Keys To Protect Applications?

Jul 30, 2011

if anyone here has ever worked with Sentinal HASP keys to protect applications.I understand how to make features in the keys but i do not understand what i need to include in my project to have it authenticate against the HASP at runtime.

View 3 Replies

Usb Modem Controlled By VB

Jan 26, 2012

We are having problem regarding on controlling the broadband with the use of visual basic. We need to transfer data from gsm to usb modem, and the usb modem will read the said data, and transfer it to a data base. Can the visual basic help us regarding our problem?

View 1 Replies

Let My Query Being Controlled By A Checkedlistbox?

May 20, 2012

I have a Query which looks like this (in Query builder VS11)[code]...

so if a user selects the option 'programmeren' in chkbRequirementsm (= the name of a checkedlistbox) in the query it should start looking for all the programmeren with value True.

View 9 Replies

Remote Controlled Browser In .net?

Jun 27, 2012

im working in a Statistics Company in my country working on the use of the internet. So as part of my project i thought i would make something like this ... I want to make a browser (which is something very but very simple and i have it ready) but i want this browser to be able to be viwed and controlled remotely by another person (my company) ... Of course people who will use it will be informed what they are doing ... It is in no way illegal while people are getting paid for this... My problem is that i dont know if it is even possible to be able to view and control my own browser remotely from my pc when it runs to another pc ... If it is possible can you please quide me on how to do this ?

View 13 Replies

C# - Switch Component Controlled Via USB Port?

Jun 21, 2009

I need device switch component which an be controlled by code(.net,C# Or vb) ON/OFF state is enough. I have code knowledge in C#, .net window application, I need to make a switch that can be controlled using code via USB port ... so that using that switch I will turn on/off electrical devices (fan,light) for a specific time interval.. For my MINI Project

Note: I need the brief note regarding components needed and how to assemble it.

If you know any link which resembles this type of project pls refer me.

View 3 Replies

Cursor Change Controlled By A Timer?

Jan 12, 2010

Im trying to implement a cursor change when a picturebox is moving which is controlled by a timer.

ive managed to created a cursor change in a button click event but i really need to control it using timer

View 1 Replies

Media Player Controlled Through Voice?

Nov 21, 2009

Media Player Controlled Through Voice?

View 3 Replies

Opacity Of A Form Controlled By User?

Mar 30, 2009

I would like to show a form... example: Form13.Show()However, I would like to have the Opacity of the form controlled by the user and I am having trouble figuring out the coding. Ideally I will have a track bar to choose the level of opacity and a "Show" button for the user to click. But I am trying to tackle one issue at a time. I am using VB 2008 Express edition if it makes a difference.

View 4 Replies

Photo Album Controlled By Button?

May 17, 2011

"Create a "photo album" of your favorite musical band, favorite vacation, favorite sports team, etc. Include at least five pictures or images. Your photo album should include a button that advances the program to the next photo, as well as a label that describes the picture."The code i currently have is...

Public Class frmPhotos
Private Sub ExitToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitToolStripMenuItem.Click

[code]....

View 3 Replies

Open Default Browser In A Controlled Window?

Jun 9, 2012

i want to open the DEFAULT webbrowser of a computer in a controlled window in vb.net , and inside that windows (of the controlled default browser ) to open a webpage and remain in this page for a certain time ... then open another webpage in the same window and remain again for certain time ....

View 1 Replies

System Time Controlled Dialog Boxes?

Oct 2, 2009

I'm rather new to programming in general, but I have written a rather useful program for the company I work for. What I am trying to do is control the way a dialog box is displayed. I want a dialog box to pop up at certain times like 7:00 PM, 8:00 PM, etc.

View 1 Replies

System Time Controlled Forms/dialogs?

Sep 25, 2009

I'm relatively new to visual basic and programming all together but I've managed to write a pretty useful program for my division. I am trying to add some more functionality however and that's why I'm here...because I am having trouble understanding how to make a windows dialog box pop up after the system time reaches a certain time.

View 9 Replies

Display Data From A Complex Sql Query Controlled By 2 Combos

Oct 18, 2009

I need to display data from a complex sql query controlled by 2 combos. The sql main query part is working fine but I cannot get to link the combos to the query. On form load I load combo1 by means of a sub. Then with SelectedIndexChanged I load the combo2. Both combos load fine by do not intereact with eachothers meaning combo1 doen't filter out combo2's information.

CODE:

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

Timer In A Thread - Routine Which Is Controlled By A Timer

Aug 13, 2010

I have a routine which is controlled by a timer. It works perfectly. The problem is that now, I need to run this routine several times, so I need to start differents threads so that my program doesn't get hung up. I've been trying to start my timer inside a thread, but it doesn't work!

View 18 Replies

Control The Controlled Volume Control?

Apr 7, 2012

Here is simple and effective code using API acting like Windows volume control, you can use to increase, decrease or mute overall computer volume

[Code].....

ok so i got this from someone and it worked but i was wondering how i could find out or if you know what uinteger would allow me to increase my volume by a greater amt and decrease it by the same amount?

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

Start Button Loop A BackgroundWorker With Sleep OracleConnection Results After Each Loop Till Stop Button

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

For Loop And Last Value From The Loop Is Displayed In The Label

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

BackGroundWorker And Loop In A Loop?

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

Convert A Loop To A For Loop?

Nov 18, 2009

How do you convert a loop to a for loop

View 5 Replies

Converting A Do While Loop To A For Next Loop?

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

Create Var With Loop (ex: Dim A1,a2,a3 With Loop)?

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

Difference Between A Loop That Never Ends And A Loop That Ends?

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







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