this is my code right now i want to make it so that it will keep adding the total. meaning if i get an answer then get another answer i want both of them to add up and show.how can i change it so that it will do tat??
That I fill with a list of base words, but I now need to build a new list of words in which will contain a list of every combination of words in the baseList (given that each string is less than the maximum length i specify)For Example if baseList contains
horse at ten football
and the maximum string length is set to 10, the finalList would contain
I have a database (SQL Server 2008) with multiple tables and records. 1 Table contains all kinds of invoice items, which have a unique id, Client ID and invoice number.
My goals is as following: - I want to show the invoice items in an datagrid, all merged as 1 invoice item (showing date, total without VAT, total with VAT, VAT percentage, VAT value and if the invoice has been paid or not.) - The datagrid should only contain the invoices for a specific client. - Should add up totals (Amount paid, Amount not paid, Amount Overdue, Total Amount) - Should be withing specific date range.
Everything in this table has been saved as varchar except invoice id and unique.
I currently have two stopwatches ( running in a VB 2010 program. What I would like to do is combine their values together and have their results outputted in a string formatted as 0:00:00.I tried the Add method and the + method but this fails.This is in short what I have:
Dim timer1 As New Stopwatch Dim timer2 As New Stopwatch [Assuming the timers were started separately]
convert the following code to work in a visual studio 2008 windows form application
How do I code the total cost to give me a pound sign with the total cost at the moment when the total comes up for an example it gives me 3.6 when I need it to show £3.60 here is the code I have so far. [code]
a. Level 1 - $10.00 b. Level 2 - $12.00 c. Level 3 - $14.00 d. Level 4 - $16.00 e. Benefit Deduction Rate - 0.10 f. Overtime Factor - 1.5
For ease of program maintenance, all of the above rates and factors must be stored in module level constants. All references to pay rates in the program must refer to the module level constants.
When the Calculate button is clicked:
a. The value in the Hours text box must be validated to insure that it is numeric value greater than zero.
1. If the value is not valid, a message box must appear as shown below and the user must be offered the option to continue processing or quit the program.
2. If the user chooses to continue processing, the focus must be set to the Hours text box.
3. If the user chooses to quit, the program must close immediately.
b. If the value is valid, the program must calculate and display the total pay in the Total Pay label.
1. The pay rate is determined by which Job Grade radio button is checked.
2. For hours less than or equal to 40, the total pay is the hours times the pay rate.
3. For hours greater than 40, the total pay is 40 hours times the pay rate plus the hours in excess of 40 hours times the pay rate times the Overtime Factor.
4. If the Full Time radio button is selected, the total pay must be reduced by the Benefit Deduction Rate.
5. The value displayed in the Total Pay label must be formatted with a dollar sign and with two decimal places.
6. The focus must be set to the Hours text box.
Why i get an error when i try to run this code
Code:
Also the message box, both yes and no close the program.....
I am working with VB 2008. I want to be able to run this program say in N: and it will show me in an excel sheet the following:
Folder Path Size(GB) Count of Files N:Clients 0.53 308
where clients contains subfolders and files and the size is the total of all those files within each folder and the count is the total within each folder also.
This works fine as it is but i have to select one by one the top level folders and some of them are huge so it takes forever to give me an answer.
1) I would like to see in my spreadsheet the following by only select the network drive n:
I am using visual basic 2008 amd creatomg a datagrodview format like below [code] Now I wnat to get total balance in total column after less discount in percentage with ENTER EVENT proceedure and get the whole total column balance in a textbox i.e Net BalanceTextBox. Please tell me how to calculate discount in percent % and get total in total column and also tell me how to move cursor in next cell instead of bottom row in datagridview.
I have 3 columns in a unbound datagridview, "length" "height" and "Total". Total = length x width and the final total in TextBox outside of the Grid. I found question simalar in this forum and tried the code but i am getting errors.The following is the code i am using
I want add a Total textbox to every form.The total will add the values that will be entered in the montant textbox. So the total will take the specific value of that texbox for all the entries that the user will have and add them. How I can do so?
I have created a little backup script to backup users files, and incorporated a little progress bar.The backup script backs up 5 main directory's on the users PC.Is it possible to have the status bar display total time for each individual directory? instead of each folder within a directory? [code]
I am having trouble trying to add the grand total arrays of number of passengers and the total cost into the list box...the way I have it right now it says for each city whatever the amount that was chosen in the combo box last and same thing with the price. I am thinking you have to use a loop of some kind to sort through all the cities and add them up individually.
Option Strict On Public Class Form1 Dim decCostPrice As Decimal Dim intNumbOfPassengers As Integer Dim decFinalCost() As Decimal Dim intFinalPassengers() As Decimal [Code] .....
I have a text box in form1 that displays the total, I want to carry this over to form 2 into another text box as I navigate between them, how would I do this? Also I have a button on form2 to return to form1 but I need all the data that has been input by the end user to be cleared from both forms when returning, again how would this be completed?
I'm maintaining a Accounting program.. I have a Cash Book Table in SQLserver Databse...field are DATE DESCRIPTION DR CR RT(Running Total is empty record). When in Insert a transaction into that Table the Running Total should give the correct balance for example :
Date Desc Dr Cr RT (Running Total) 1/1/2011 Cash Balance 5000 5000 1/1/2011 Purchase 2000 3000
[code]....
I'm inserting record into that table through Windows form.
I have a Datagrid with 4 columns. Column 1 is ID, Column 2 is Products, Column 3 QTY, Column 4 Price and Column 5 is Total. I would like to get the Total of Column ID if it has 3 of the same ID and the Column 3 Price is $10.00 ea. Then on the Coulumn 4 Total get a result of $30.00.
as a starter project I am trying to create a list of checkboxes with the text as takeaway menu dishes & have labels assigned beside them containing the prices. if some of the checkboxes are checked I would like the total of the prices in the corresponding labels to appear in a text box & the dishes on the checkbox text to appear in a message box. I've managed to code my messagebox output but can't seem to figure out how to add up the selected labels.Here is my code so far, could someone please suggest a way of achieving what i'm trying to do.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim dishes As String = ""
I have three Columns of text boxes and I need each column to be added up and displayed in a text box directly below each column with out using a button. The program is a cash counter I already have the code done for multiplying, for example txt1.text = txt2.text * 0.01 (not the exact code) anyway the totals from these is displayed in the columns I was speaking of. I tried the same method I used for multipling but that doesn't work.
I'm in a beginner programming logic and technique class that also teaches us VB, and I'm working on a program that is to simulate total theater revenue, that asks for the number of tickets sold in a particular section and then displays the amount of sales generated from that section. It needs to validate that the total number of tickets sold is not over the maximum seating in that section.[code]
1) I have a warning that "Variable 'section' is used before it has been assigned a value. A null reference exception could result at runtime" in line 18.
2) Regardless of the changes I've made, I always end up getting "0" as my end result. I'm actually supposed to use the toString currency format function when getting my end result, but that was mixing me up so I figured I'd at least make sure the output is correct before I fix that part. I thought I was on the cusp of having this working but I think I'm confusing myself more and more the more I mess with it.
I'm new to forums as well as new to VB 2008. I'm in process of making a order calculator which will total any values you selected in combo boxes/checkboxes and then display it in a selected area. There are 3 things that I want to achieve: 1. Be able to add another total to an existing total (currently I'm able to see only one total when I hit "Calculate" button)2. Display how many orders I have made so far (new total counts as one order)3. Be able to add up checkboxes selected to an overall total. (when I try to add up one checkbox with another it seems to be stuck on 1.5 pounds which I assigned for each "side order")
I'm a long time VB.NET developer and has recently switched to C#. I found out that some of the built-in VB.NET functions (which predates .NET back to 6.0 and BASIC itself) such as the String.Left, or Right, or advanced functions like saving to the registry (SaveSettings and GetSettings) are noticeably absent. What I did was create a new project in the same solution with VB.NET as its language and recreate basically all the functions I need that are available in VB.NET. And then I just call that to the C# code I'm writing.Since compiling the code in .NET pretty much boils down to the same CIL, it shouldn't matter performance-wise what language I wrote the code in or whether I mix C# with VB.
I'm trying to write 2 extension methods to handle Enum types.One to use the description attribute to give some better explanation to the enum options and a second method to list the enum options and their description to use in a selectlist or some kind of collection.You can read my code up to now here:
<Extension()> _ Public Function ToDescriptionString(ByVal en As System.Enum) As String Dim type As Type = en.GetType Dim entries() As String = en.ToString().Split(","c)
[code]....
So my problem is both extension methods don't work that well together. The methods that converts the enum options to an ienumerable can't use the extension method to get the description.
I'm working with a third-party library interfacing to an old database system. There's a method - CallProg that calls a "stored procedure" (for lack of a better translation - any Pick users in the crowd?). However, instead of doing something like this:
Public Sub CallProg(ProgName, ParamArray ProgArgs() As String) ... End Sub
I have 3 textbox's and 1 dropdownlist and I am trying to combine all that data into one string. Here is what I tried but is not working:
Private Sub FullAddressTextBox_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles FullAddressTextBox.TextChanged FullAddressTextBox.Text = AddressTextBox.Text & " , " & CityTextBox.Text & " , " & StateDropdown.text " , " & ZipCodeTextBox.Text End Sub
My goal is to combine these simultaneously as whoever is filling in the data or after I hit my submit button, if so it has to occur as the first event.
I think my problem has to do with .text after the statedropdown, Is it suppose to be .tostring?
I've seen several posts on the subject, but none seem to answer this particular dilemma. I have two datatables that I obtained by querying two separate servers.[code]