Calculation - Outcome At Label30.text Be 7.0785 And On A Calculator 7.09995 ?

Jan 7, 2010

This is a problem i noticed by accident.

The code is below.

For the example lets set

Num1 is 10 and Num2 is 10.

Then how can the outcome at label30.text be 7.0785 and on a calculator 7.09995 ?

Public Class Form1

Private subtotal As Integer = 0
Private Sub Label33_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label33.Click
End Sub

[CODE]...

View 4 Replies


ADVERTISEMENT

How To Use 'Or' / Make A Different Outcome

Oct 22, 2011

So I am trying to make it when you buy wooden shield from the shop then your defense will change. I don't know if I will have to change my whole code.Basically At the moment it's:If Progressbar2.Value = 100 Then MsgBox("Oh Dear you have died!")`And the bars maximum value is default 100.. And the shop is in a different form.. (Ex. the Game is Form1, the Shop is Form4)So I want to make it when I click the button it changes the values to be:[code]

View 1 Replies

Determine Outcome Of Messagebox.show

Oct 15, 2011

I have a button that when clicked i want the user to make sure that they want to clear data in textbox's so i did a vbYesNo box inside the messagebox.show.i cannot figure out how to determine if its a Yes or a No.If they click YES then i want the text cleared ... if no then show nothing. I know that i have a msgbox there but thats meaningless its just to show if it works or not. once it works then i will remove that code.[code]

View 5 Replies

VS 2005 Store A Calculation To Use Later And Obtain A New Calculation

Dec 19, 2009

I need to store a calculation to use later and obtain a new calculation

[Code]...

View 4 Replies

Macro That Does A Calculation - Text To Time

Jun 10, 2011

I have the following macro that does a calculation. Im trying to set it up for time. So an example of what I come up with for my Text18 bookmark is 12.45 and I want it to say 12 min 45sec. Is there a way to due this?

Sub InsertRatio1InBookmark()

Dim num As Double

Dim newText As String

[CODE]........................

View 2 Replies

New Text Doesn't Appear On A Label After I Do A Calculation

Mar 9, 2009

I am writing a program that finds the net pay of an employee.

The label I want the net pay to go into is lblPay

I also use lblPay.Text = decNetPay

It doesn't show up when I click the "Calculate" button. What does show up is $000.00

View 3 Replies

Calculation Time - How To Continuously Update The Text Box

Sep 14, 2010

I need to be able to display 60 * x. X is going to be the time between hitting a Stat button and a Stop button in seconds. I need this to be shown until it is stopped. So i was thinking something like txtBox1.text = 60*time, but I do not know if that is correct and I do not know how to get that time. Also I am not sure how to continuously update the text box.

View 6 Replies

Display The Calculation Of Time Span In Text Box?

Mar 14, 2010

how to display the calculation of time span in text box? i have this coding and dont know how to get the value between two time.. what type of format of time span that i can use.

Dim date1 As New System.DateTime(1996, 6, 3, 22, 15, 0)
Dim date2 As New System.DateTime(1996, 12, 6, 13, 2, 0)
Dim date3 As New System.DateTime(1996, 10, 12, 8, 42, 0)

[Code].....

View 2 Replies

VS 2005 Textbox.text Times By Calculation?

Nov 20, 2009

Protected Sub Button4_Click1(ByVal sender As Object, ByVal e As System.EventArgs)
Dim total_rental_chargeTextBox As TextBox = FormView1.FindControl("total_rental_chargeTextBox")

[code].....

View 4 Replies

Mimicking Does A Simple Calculation Where It Takes Key And Plain Text Characters

Jan 31, 2011

I am trying to mimic an encryption application. The application I am mimicking does a simple calculation where it takes the key and the plain text characters 7 bit ascii code and xor's them together. If the two spots in the code are = then it returns a 0 if it is ~ then it returns a 1. I have tried several code snippets for xor and none of them produce the results I want. I have only taken a couple programming classes so I get lost easy. This is what I have so far. My goal is to decrypt something encrypted by the program I am replicating using a password generator to come up with the key.I already have the binary for the encrypted text from the program I am copying. So I need to convert the key into the matching binary format. I used this snippet for that. [code] When I run this as is I get a much longer result than I should. If I use an "a" as my key and "00000000" as my cipher bi the result is "0011000000110000001100000011000000110000001100000011000000110000" when it should be "01100001".

View 14 Replies

Currency Calculator - Rich Text Editor Control?

Mar 1, 2011

Does anyone know of a good rich text editor control? I am looking for something that can take either, plain text, rtf and html. I want to be able to edit the text. It would AWSOME if it can convert rtf to html and html to rtf. I have tried the C1 and that was bad. It does not read rtf and does not convert anything. And it was really slow.

View 4 Replies

VS 2010 - Append Text Method Calculator Code

Mar 15, 2011

I am coding a simple calculator and I need the textbox to show the previous entries when I enter them. I hear the best way to do this is by Append Text? For example I click 3 Then + The textbox will show "3+" etcetera.

View 1 Replies

Make A Calculator That Adds From Two Text Boxes And Displays The Answer In Another Box?

Apr 23, 2010

I'm trying to make a calculator that adds from two text boxes and displays the answer in another box, but It gives an error when someone enters a character. What can I do to display a string error message in the third box if a letter is entered in one of the first two boxes instead of a number?

View 1 Replies

Hexadecimal Calculation - Make All The Text Boxes And Label Only Except Hexadecimal Inputs,when Press Button1?

Oct 27, 2009

I have a Form with 4 Text Boxes, 1 label and one button. What I need to do is: Make all the text boxes and label only except Hexadecimal inputs.when I press Button1

Label1 = TextBox1 AND TextBox2 ^ TextBox3 MOD TextBox4

Once again every all the numbers are in Hexadecimal format.

View 1 Replies

Add Vat To A Calculation?

Mar 9, 2009

Heres my code in vb 2008[code]...

I need to add 15% vat to it and i have no clue how to add the 15% vat.

View 1 Replies

Calculation Of Age?

Aug 29, 2010

compute an exact age of a person using the format date of mm/dd/yy... in vb.net, i was trying to code it but the result was not the exact age of the person.lp me...

View 11 Replies

'if / Else Calculation Statements

Oct 6, 2010

I am using Microsoft Visual Studio 2008 with VB.NET, and in class we were assigned this project: A procedure should calculate a 2% price increase on all red shirts, but a 1% price increase on all other items. In addition to calculating the price increase, the procedure also should calculate the new price. You can use the variables strItemColr, strItem, decOrigPrice, decIncrease, and decNewPrice. Format the original price, price increase, and new price in the lblOriginal, lblIncrease, and lblNewPrice controls, respectively.

View 1 Replies

Calculation In DataGridView?

Sep 12, 2010

I have datagridview, wich have 5 columns

example:

id supplier bought payed sum
1 a 15
2
2 a 20

[Code].....

View 3 Replies

Calculation In Function Is Different?

May 8, 2011

i have an issue with my program. when i create a function and use a calculation in it it returns a wrong answer. if i copy the calculation and put it directly in the btnClick event it works ok. is this normal?

here is the code if you would like to try see what i am doing wrong.
Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click

[code].....

View 6 Replies

Calculation In VB - Keep Getting An Output Of Zero

Aug 21, 2010

I'm having trouble with a calculation in VB and it's a simple one but for some reason I keep getting an output of zero.

Here's the code for the calculation and the click button:

CODE:

View 5 Replies

Calculation Of Amount Due?

Apr 15, 2012

i have this problem on how to calculate the amount due in our system in VISUAL BASIC.NET .in returning module, (this is for penalty purposes), if the borrower didn't return the book on time, the system must automatically generate the amount due .one daY is equivalent to 10(ten) pesos.so if the borrower didn't return the book with 2 days. the amount due must be 20.00 pesos.

View 6 Replies

Calculation Of Two Fields In ASP.NET ?

Jan 5, 2011

I have two money fields in a SQL database called TotalClaimed and PartialSettlementAmountRecd.They are declared as Decimals like so:

Public PartialSettlementAmountRecd As Decimal
Public TotalClaimed As Decimal

They both output the repsective amounts perfectly. I need to do a calculation on them, by subtracting PartialSettlementAmountRecd from TotalClaimed. I have tried the following, but it just outputs a random number, not the amount I require.

Dim NewSettAmount As Decimal = (ClaimDetail.TotalClaimed) - (ClaimDetail.PartialSettlementAmountRecd)
Response.Write("New Settlement Amount: £" & NewSettAmount)

View 3 Replies

CRC-16 Calculation On An Array

Feb 1, 2012

I found this thread in regards to calculating CRC16 on an array.... however, it does not work probably because it was written for VB6 and not .NET. [URL] Does anyone know of a built-in function in .NET to calculate CRC16? If not, is there a way I can adapt the above VB code example to work with Visual Studio 2010?

View 12 Replies

Doing A Calculation Between Textbox?

Mar 15, 2012

what i am trying to do is i have two textboxs which have figues in them and need the 3rd textbox to display the figure the code i am using doesnt seem to be doing anything could anyone spot it and tell me why it is not working for me

[Code]...

View 2 Replies

Doing Calculation Between Textboxs

Mar 17, 2012

i am trying to do is i have two textboxs which have figues in them and need the 3rd textbox to display the figure the code.[code]I want the answer doesnt display in the textbox as i want it but when i click on the text box nd type anything the answer shows but in the error

View 6 Replies

Factorial Calculation Using .net?

Dec 15, 2011

Develop an application which reads two integers n1 and n2 from the user via two textboxes and displays in a label the sum of the factorial of the integers n1 and n2?

View 3 Replies

Get More Accuracy In Calculation?

Jun 9, 2011

I'm writing a financial calculator. I know that my calculations are more precise when Decimal format is used. But when I calculate 314/365, the answer given by VB is 0.8602814581, where as the real answer is 0.8602739726. This ends up affecting my calculations quite a bit.

View 7 Replies

Math Calculation In Vb?

Jan 27, 2012

I am trying to perform a simple multiplication in vb.

Below is my code:

Dim minus As Integer
Dim minusPrice As Integer
Dim totalPrice As Integer

[Code].....

View 4 Replies

Progress Bar With Calculation?

Aug 25, 2011

I have an array of characters. Depending on the number selected (between 1 and 30), the program selects random characters and concatonates them into a string. Kind of like how I think a password generator would work.I want to update a progress bar to show how the operation is going, but I need to reserve 20% of the progress bar for some actions before this, and the last 10% for the actions that follow it. So there is 70% available to use. My question is:If I set the progress bar to 20% and do the following math: 70/NumOfChars, then use a for loop to add the result of this to the progress bar (pb+=result), why does the total progress NOT EQUAL 90%!

View 1 Replies

Use Numericup / Down In Calculation?

Nov 14, 2008

I am trying to figure out how to take what the user selects in the up down menu and use it in my calculation.

View 2 Replies







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