How To Multiply Or Add Two Values
Sep 10, 2010
I am a student in South Africa. We have had a long strike in our education department. Thus resulting in our lecturer not teaching code adequately. I have managed to stumble using the text given but I cannot figure out how to multiply or add two values?
View 1 Replies
ADVERTISEMENT
Jan 31, 2011
How can we multiply the values of the text boxes(reportitems) in rdlc report?
Ex. The expression of TextBoxResult report item is:
=Reportitems!TextBoxPrice.Value * Reportitems!TextBoxQuantity.Value
View 2 Replies
Mar 14, 2011
i want to know how can i multiply values in two column and assign it to another column in datagrid view. i am using vs 2008 and mysql db.
View 2 Replies
Nov 15, 2011
I want to multiply or add the values of two or more cells in a datagridview control in a row and and should also be auto-saved in the database after entering datas in the cell. I am using SQL Server 2008 for my database. do take a look at the screenshot attachment that I made for further details..
View 4 Replies
Jan 11, 2011
I have built a small VB.NET Calculator but whenever I add, subtract or multiply by 0 the answer is always 0. Here is my code:
Spoiler
Option Explicit On
Public Class Calculator2
[Code]....
View 13 Replies
Aug 11, 2010
I need to figure out how to multiply hexadecimal numbers in vb .net 2008.Ex / 7E1 x 2 == FC2I was thinking maybe converting the hex to bytes, multiplying that, then back.
View 13 Replies
Jun 6, 2012
i have a problem for put in multiply input
Try
Dim StrSQL As String = "INSERT INTO boranga" & _
"(IdBorangA,Answers)" & _
"VALUES (@B_IdA,@B_Answer);"
[Code].....
by adding more parameter "parameterB_IdA.Value = Label1.Text" for IdBorangA
and "parameterB_Answer.Value = TextBox2.Text" for Answer but the result i get that the table only filling with the data from Label2.text and Textbox2.text.
View 1 Replies
Aug 9, 2008
My problem is printing multiply pages. The below test code prints from a ListView display, being populated from a database, which works fine for the first time, however, all subsequent times page two data is printed over page one data. Is there some way of resetting for successive printing.
Private Sub pd_PrintPage1(ByVal sender As Object, _ ByVal ev As Printing.PrintPageEventArgs)
Dim printFont As Font = New Font("Courier New", 11, FontStyle.Bold) Dim linesPerPage As Integer = 0 Dim yPos As Single = 0 Dim leftMargin As Single = ev.MarginBounds.Left Dim topMargin As Single = ev.MarginBounds.Top Dim
[code]....
View 14 Replies
Feb 21, 2009
how to send multiply files over FTP with Visual Basic 2008 (.NET).
Here is the code I'm using:
Code:
Try
Dim clsRequest As System.Net.FtpWebRequest = _
DirectCast(System.Net.WebRequest.Create("ftp://FTP server here/" & "FTP output filename here" & ".txt"), System.Net.FtpWebRequest)
[code].....
View 4 Replies
Oct 14, 2010
I'm having trouble using Visual Basic. It's my first time with the program that my college course is requiring I use. I'm having problems programing the script for an application. It's suppose to take the rate of a bunch of employees that are programmed into the application using an array, and multiply it by a decimal number that the user inputs into the application.
View 5 Replies
Apr 18, 2009
Suppose I have a string, if I want to basically write it multiple times, depending on some integer value. How I can do that?For example:
dim STR1 as string = "</li></ul>"
dim INT1 as integer = 4
dim STR2 as string = " "
I would like to see the output as
STR2 = "</li></ul></li></ul></li></ul></li></ul>";
Can I achieve it in VB.NET?
View 3 Replies
Feb 1, 2011
I still want to be able to show my code in front of the class/receive feedback. I originally had a program that would calculate the number of calories in your alcoholic beverage.Because I was new at it, I only had one of my beverages listed. I now want to create a combobox/ dropdown menu so that the user can select a standard alcoholic beverage (I have 6 to choose from). All the beverages have different average calorie counts. Once the user selects their beverage from the menu, they can type in the number of servings they consumed (standard size). They would then push a calculate button and would receive their total calorie count. I have everything up and working but everytime I enter a random number of servings and push calculate, it only multiplies by "100" which is the average calorie count for a serving of Light Beer-- the first listed.[code]
I just added the If/Then/Elseif stuff a couple of minutes ago, hoping it would work, but it doesn't. I know this is something simple but like I said, I'm brand new but I have searched everywhere trying to figure this out. I've watch 9 tutorials so far but they all don't really pinpoint what I want my program to do.
View 4 Replies
Apr 18, 2012
if i had say 10 labels with 10 textboxes how would i save all those labels accosiated with that text box as one text file
say example
label = name ---- textbox1
label2 =surname ---- textbox2
label3 address ---- textbox3
etc
so in the text file it saves it to look like this
name = hayden
surname = doh
address = johnston hwy
View 3 Replies
Oct 4, 2011
I'm trying to figure out how to multiply two text boxes but also after they are multiplied, they need to be added at the same time. For example, if in one text box I put 120000 and in another I put .06 - the answer multiplied together is 7200, but the final answer should show 127200.
[Code]...
View 4 Replies
Aug 25, 2011
I am going to blend two images together using multiply blending, and will iterate through all pixels. I have search in wikipedia that the calculation of multiply blending is:
resultRGB= src * dst / 255
but it didn't mention about alpha, how does alpha affect the result?
For y = 0 To fsrc.Height - 1
For x = 0 To fsrc.Width - 1
Dim d As Color = fdst.GetPixel(x, y)
Dim da = d.A / 255, dr = d.R / 255, dg = d.G / 255, db = d.B / 255
[code]....
View 2 Replies
Apr 12, 2010
i have 6 groups of 5 textboxes each one with numbers 12345 i want to know how i can multiply them and how to see the 15625 numbers
View 31 Replies
Sep 15, 2009
How would I get a button to divide and multiply?
View 7 Replies
Feb 25, 2011
2 forms, on the first form I have a listbox which recieves it's items from a datagridview, when I click on a button all the items (in the listbox) are converted to a string and add to a richtextbox on the second form.
On the second form I have also a numericupdown, and here is what I run into.
With the numericupdown I want to multiply or remove blocks of strings from the richtextbox.
For example, when clicked on the button (form1) a string is add to the richtextbox, when I click (on form2) on the upbutton of the numericupdown I want to add the same string again below the existing one with 2 blank lines between them (this can be down a lot of times). When I click the downbutton, a string should be removed.
In short term, the amount in the numericupdown should be the amount of string blocks in the richtextbox.
Here is the code I use to copy listbox.items to string and add them to the richtextbox:
Public Sub SGLists()
Dim i As String
For Each i In Me.ListBox1.Items
[Code]....
View 12 Replies
Nov 13, 2010
If i have 55 checkboxes with different text 1,2,3,4 and so on and a textbox where it display how many no. of checkboxes checked.i want to multiply the multiple selected checkbox text with how many checkboxes are checked in other textbox..i want to do this using vb.net, asp.net
View 1 Replies
Mar 14, 2009
Ok, now I have another problem that I cant seem to figure out I now have the "Labour charge section" just incase the service requires one. which in alot of cases it does. So, I have a test box called text box 1, which I want to be able to insert "hours worked" which is a "digit" and then Have a fixed value, of five. Which the user can later change. The number from the box, and the user specified Hourly charge, must then be multiplied to create the total labour charge which will be inserted into a label view. So, my question first, is, how would the user be able to set the hourly charge and then not be able to change it by accident. I was thinking of having a tool strip with an options tab and then setting, and then you use that to fill the info, and have that hourly charge, hidden of the actuall form so that it cant be changed by mistake. Then, on to of that, how would you multiply these two numbers?
View 39 Replies
Feb 23, 2010
Is there a built-in way to multiply every member of an array by some number in-place?
Example:
Dim volts () as Double = {1.243, 0.534, 5.343, 2.223, 4.334}
Dim millivolts (4) as Double = volts.MultiplyEachBy(1000) 'something like this
View 2 Replies
Jun 17, 2011
I want to multiply textbox value with ms access tables field value and insert the output in field two .i get error : table is not declared.
Private Sub TextBox1_Change()
If IsNumeric(TextBox1.text) Then
table("table1").field2("record1").text = TextBox1.Text *
[Code].....
View 2 Replies
Mar 12, 2012
I am struggling to write the code for a calculation. The calculation I wish to do is to multiply the quantity of an item by the price. The problem is that the "form" i am creating uses a letter (i.e A, B, C etc) which corresponds to a set value. I do not know how to link the Letter to the corresponding value.
For Example, A= 25, B= 20, C=25
I want to calculate the total of 6 lots of A. I am also using a Combo Box to list the Letters.
View 2 Replies
Apr 2, 2009
[code]what I have done (with some help) is find a timespan. the timespan (between when an employee logged in-out) is, for example, 1:15 (1 hour, 15 mins).the pay rate is 6.00 (representing $6.00)I can't get the program to multiply the timespan by the payrate..Error: 'Conversion from string "02:00:00" to type 'Double' is not valid.'
View 5 Replies
May 19, 2010
Basicly I want to create a server that can read data sent by multiply clients and give feedback to them I have found some tutorials before but its only oneway trafic (Client>>>>Server) and the server crashes as soon as the client is disconnected
ps. If its a tutorial with VB it will be nice other visual codes are also good
View 6 Replies
Feb 28, 2012
I have the following SQL query to return all Customers who have no OrderLines with no Parts assigned - i.e. I only want the customers within which every order line of every order has no parts assigned - (in the actual problem I am dealing with a different domain but have translated to customers/orders to illustrate the problem)
SELECT c.Customer_PK
FROM Customers c
INNER JOIN Orders o[code].....
This works but generates less than optimal SQL - it is doing a subquery for Count on each row of the customers query rather than using Group By and Having. I tried making the LINQ Group By syntax work but it kept putting the filter as a WHERE not a HAVING clause.Edit in response to Answers below: I am accepting JamieSee's answer as it addresses the stated problem, even though it does not produce the GROUP BY HAVING query I originally had.I am a VB developer so I have had a crack translating your code to VB, this is the closest I got to but it does not quite produce the desired output:
Dim qry = From c In context.Customers
Group Join o In context.Orders On c.Customer_PK Equals o.Customer_FK
Into joinedOrders = Group[cod].....
The problem I had is that I have to push "jl" into the Group By "Key" so I can reference it from the Where clause, otherwise the compiler cannot see that variable or any of the other variables appearing before the Group By clause.With the filter as specified I get all customers where at least one order has lines with no parts rather than only customers with no parts in any order.
View 3 Replies
Jun 13, 2011
My problem is, the data that I pull from the database, when try to multiply it, it didn't multiply.
The database has Fruit and FruitPrice column. When select fruit form the combo box, it will search the price. But I can't seem to multiply it. The price is display at PriceTextBox but when multiply it, it shows 0 in the TotalTextBox. It is a simple problem but I've tried everything I know but it still didn't multiply.
This is my search coding:
CODE:
View 3 Replies
Sep 10, 2009
I have a table with a Real datatype field. I just can't multiply it with other integer fields although the editor doesn't show any error - the result is always '1'.
View 4 Replies
May 3, 2011
I have an application that has 3 list boxes, one selects a workshop, the other a location. the third is to display selected costs.to do the calculation a loop is required. i have written the code but when i calculate the cost the final result to be displayed ends up as being the cost of the last work shop and location * 3,What is supposed to happen is the location is multiplied by the number of days(3 in this case) and added to the workshop cost.the loop is supposed to add all cost from the list box till all have been added.what is happening is the calculation goes to the last entry as stated the multiplys this total by number of days(dbl)?
View 1 Replies
Apr 16, 2009
How can i put a scrolling a buttons?I want a put a multiply buttons vertically and when it the control exist beyond there size of the form will automatically show a scroll bars...Is there have a control that i have to use?
View 6 Replies