Quadratic Equation - Input An A,b And C Value And It Finds The Roots

Apr 13, 2008

Public Class form1
Inherits System.Windows.Forms.Form
Private Sub cmdCalc_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles

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

This is my code for solving the quadratic equation..you input an a,b and c value and it finds the roots but i dont know how to graph it.

Write A Program To Compute The Roots Of A Quadratic?

Nov 25, 2010

i cant seem to figure out where i am going wrong with this. im new to programming and havent really ran into many problems yet but this one has me baffled. i need to write a program to compute the roots of a quadratic i have my code and i am not getting any errors problem is i must check that the a value is nonzero so when i set my if block and use "if a = 0" and then display message it seems that it doesnt pass the values on to the else when a does not = 0.

[Code]...

VS 2005 User To Input Equation Such As A+B Into The Box?

Dec 29, 2009

I wanted to have a textbox that can be input in terms of numbers. Then I need to use the number user input into a certain equation. How I can do this??

Also if I want a user to input equation such as A+B into the box, but then I need to use the equation user input to find answer for certain A and B value. Can this be done?

VS 2005 Extract Input - Can't Use The Equation To Add Two Numbers

Jan 4, 2010

I know how to read input numbers, but when I input equation like A+B, I can't use the equation to add two numbers. I tried many times but failed to use the equation.

Here my

Public Class Form1

Dim Number1 As Double
Dim Number2 As Double

[CODE]....

Develop A Simple Math Calculator That Will Allow The User To Input The Right-hand-side (RHS) Of An Equation Into A Textbox?

Dec 12, 2011

I am trying to develop a simple math calculator that will allow the user to input the right-hand-side (RHS) of an equation into a textbox on the application and have the application evaluate the expression for a given value of x, which is also input
into the application by the user via another textbox.For example, if the user wants to evaluate the following expression,

y = 3 + 4*x + 5*x^2

then they would input into the textbox the RHS of the equation

3 + 4*x + 5*x^2

and then enter a value of x into the another textbox and click on the calculate button.I tried this:

but it doesn't work.

Finding The Roots Of Equations?

Nov 13, 2010

I am trying to make a program to calculate the roots of a polynomial equation using the bisection method. I have designed the program so the user input a range of x values (x1 and x2) to solve for the root. When I debug the program I keep getting zero for the root. I know there must be something wrong the way I have my loop setup that keeps giving me a zero root. Here is what I have so far

Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim x1 As Double
Dim x2 As Double

[code]....

VS 2010 - Remove All Children But Keep Roots

Feb 11, 2011

I know you can run

treeview1.Nodes.clear()

and that removes everything, but how, or it is even possible, to just remove children and keep the parents. I added the root nodes in the properties window and built my code around those, but clearing also removes them. Then of course that makes the code error as it can't find the code when I re populate the treeview.

May 29, 2010

I'm new to the server and I'm making a quadratic calculator with my friend. I have my calculator coded, but whenever i click the calculate button the answer comes up as "NaN". Here is the code.
TextBox4.Text = (intVarB * (-1)) + (((intVarB ^ 2 - (4 * (intVarA * intVarC))) ^ 0.5) / (2 * intVarA))
The Variables "IntVarA", IntVarB, and IntVarC are defined as public variables in a code module.

Publishing In Visual Studio 2008 Or 2010 - Application - Quadratic Equations

May 6, 2011

I've made a fairly good Windows form application to solve quadratic equations, but I am having a hard time understanding the publication process microsoft uses in Visual Studio. I'd like to distribute my programm as freeware on my blog.

Getting A Program That Finds Codes On HDD?

Jan 23, 2012

After a stage i have found that there are lots of codes redundancy and reusement on my disk drive. And i have also noticed that for special operation i am using the similar algorithms again and again. So i thought that if there were a program that can find the functions from specific file types producing the output of the function list etc?

A Program The Finds Element By ID With A Single Click?

Jun 2, 2011

Is there a program where i can launch a website, click on a button or textfield and it will give me the getElementByID? I searched around for this and i have found nothing? Why doesn't this exist? I am writing a program that will enter information into a copiers web interface for scanning. The problem is the copier's web interface uses Java and XML. I cannot get my program to enter the information into the apprioate field because i cant find the tag to reference it! its very annoying, this is the last stage to my program.

Create A Program That Finds Prime Numbers?

Oct 7, 2010

So I have been assigned to create a program that finds prime numbers. And then for the final part of the program I need to have the computer find the millionth prime.

Image - Fast OCR - Finds All Of The Text In A Picture

Apr 5, 2011

I'm creating an application that finds all of the text in a picture regardless of text size or font (whithin reason, Just the basic monospaced and default windows fonts). I tried making my own but it was slow and very unreliable. I need it to work fast (as close to instant (give or take 1 or 2 seconds)). I have to run it on images 1000+x1000+ (Nothing more than 1500). I have to take the values of the text and the position of it in the image.

IO.Directory.GetDirectories() Finds Directories That Don't Actually Exist?

Jul 28, 2011

The sub below will show all of the directories contain with a directory

Code:
Private Sub showDirectories(ByVal rootDirectory As String)
Dim rootDirectories() As String = IO.Directory.GetDirectories(rootDirectory)

[code]....

When I run this code I can use any directory as the root directory except My Documents.When I use the directory path with My Documents, as well as finding all of the folders contained in My Documents, it finds three extra: My Music, My Pictures and My Videos. Those three folders do not exist at all in My Documents. I have checked hidden files and folder and they are definately not there yet the showDirectories() sub says that they are.The exact error is: Access to the path 'C:UsersMichaelDocumentsMy Music' is denied.It's dened because the folder doesn't exist. I have checked myself using Windows Explorer!Despite this, when I type 'file:///C:/Users/Michael/Documents/' in the address bar of Google Chrome, it shows all of the files and folders in My Documents and, guess what, it shows the folders My Music, My Pictures and My Videos. But Windows Explorer doesn't show these! The strange thing is, for each of the folders, the last Date Modified was 23/01/2011 13:42:49 exactly. Each of the folders was last modified at that exact second simultaneously!I have 3 "ghost" folders "haunting" my My Documents. Is there any programs out there that perform "exorcisms" cause I am seriously freaked out!Perhaps this is the wrong place to post this. When I started writing this thread, it was about Visual Basic but now I realise it has nothing to do with programming at all.

Click A Button It Takes The Text From A Texbox And Finds The Id?

Jul 24, 2011

I want it so when I click a button it takes the text from a texbox and finds the id or name that is stored in a .accdb file. I have already put a datagridview control and setup my connection to the databse. I just need help with the search button code which will pop up all the results in the datagridview control.

DB/Reporting :: OleDataAdapter With Parameters Finds 1 Of 3 Matching Records

Apr 15, 2008

I am using Windows XP and Visual Studio 2003 .NET in VB.

I have created a parameter query using data controls on a form. The SQL works when I paste it into MS Access (and set the values to those I type in the input form) it returns 3 records. In the VB form I only ever get the first matching record. By changing the input by sorting in different orders I still only get the first matching record ( a different one). If I alter my input so the first does not match but the second and third do match I get only the second. Why Don't I get the set of three?

<Code>
Part SQL:
'WHERE

[Code].....

Regular Expressions - Finds All Words Which Consists Of Letters

Jun 9, 2011

[Code] This Regex "^[" + w + "]+\$" finds all words which consists of letters "rca". This matches for all words, because all words are made up from "rca". Is there something I could add, to return False for "caar", because "rca" has only one "a", but "caar" has two "a"?

Write A Small App That Finds The Local Machine's IP Address?

Feb 26, 2009

I'm trying to write a small app that finds the local machine's IP address (and SNM, DefGW, 1st DNS server, etc) then displays this nicely.

I don't want to go down the route of doing a Shell "ipconfig /all > somefile" then reading it in as I *know* this can be done another way.

I'm using VB 2008 Express Edition.

Dec 13, 2010

I'm working on a quadratic formula program and when I enter 1 as A, 2 as B, and 1 as A (X should end up being -1), it returns "NaN" in both text boxes.

Here's the code:

CODE:

How To Stop Output Of Code From Placing A Page Break After It Finds Selection

Jan 6, 2011

Can someone tell me how to stop the output of this code from placing a page break after it finds the selection.It's placing a blank page at the beginning and end of every printout.I suspect it has to do with the insert.break method, but cannot figure out what needs to be changed. [code]

Oct 18, 2010

I have been trying to make a program to solve for the x intercepts of a quadratic formula and have gotten this far. Whenever i debug, it says "A first chance exception of type 'System.OverflowException'" It seems to be with the code shown in bold.

[Code]...

Iterate Through An Equation?

Apr 26, 2012

I want to iterate through an equation and modify a number e.g. Multiply it by 10, where there is one. How do I do this?

User Equation N Value

Mar 11, 2010

I wanted to read input equation by user A+B and assign input user value to A and B to ask them to add and give answer. But I just can't get the code to work. I using VS2005 and VB.Net.[code]

Using Function For More Than One Equation?

Apr 26, 2011

Can I use a function for more than one equation?

Program Description: Fortuitous Dice is a game that requires two dice be rolled, one at a time. If p and q are the numbers rolled on the first and second die, respectively the value of the roll in the game is determined as follows:

P Q Rule (value of the roll and condition)
Even Odd 2P + Q
Odd Even P + 2Q
Even Even P + Q When P not = Q
P When P = Q
odd Odd P + Q  When P not = Q
3Q When P = Q

Equation With Multiple Possible Results

Jul 30, 2011

I have a decent understanding of the logic, the content. I'm working on a puzzle and I'd like to write a short program. I'm looking to fill in the following variables: AB.CDE FG.HIJ (they're part of coordinates, and the puzzle is part of a geocache)
The puzzle asks you to determine which numbers correspond to certain colors, like this:

[code...]

I need to define A-J as >= 0 and <=9. I also need to say that each color is >= 0 and <=9, but that no color can be equal to another color (purple â‰  yellow, orange, etc). some number combinations won't work. Purple and yellow can't be 2 and 5 respectively, because that'd produce a negative number. I'm guessing that there will be more than one possible result. So how do I create an equation that calculates this.

Convert String To Equation?

Apr 14, 2009

I would like to read a user's input equation or expression as a string (such as "y=5*(x+6)" or "cos(3)^2") and have the program evaluate it mathematically.   Does .Net have any classes that could do this?  Obviously, the compiler can already take a programmer's coded equation and evaluate it. Of course this is a different matter, but is there not a way to harness that same power with runtime user-created equations?  Serialization or anything?

The other option (I guess) would be to create my own equation-generator - breaking an equation down into a binary tree of the numerical values and the operations I suppose.  Aside from being a nontrivial task, my program needs optimal performance as these equations are in large loops.  At the very least, this would add several conditional evaluations to each equation run - dunno if that adds up.

How To Make An Equation With Timer

Mar 16, 2010

The project is "kWh counter", that is, a simple program that calculates the power usage.The incoming numbers are the Power of the appliance (lightbulb) and the voltage (230/120).The formula is W=P*t that is multiplication of the power and the time it is used.I thought to connect it with a timer and the passing secconds multyply with the power, and, write the ussage on a label.This would be something like a simple digital power counter.Note that the voltage is not necesary.I am from europe where the standards are 230V.

How To Solve An Equation That Is A String

Feb 9, 2011

I have an equation in the form of a string:

[code].....

Jun 8, 2011

My assignment is to get the Get Monthly Income (Num1)Get Monthly Home Rent/Mortgage (Num2) Get Other Monthly Payments (alimony, child support, student loans) (Num3) Display Allowable Monthly Car Payment Display Maximum Car Value (interest rate based on credit) (answer) Public Class Form1

[Code]...

Use Day & Month In Simple Equation?

Mar 26, 2012

What I need to do is automatically generate a specific PIN number based on the current date. The formula goes like this: MMDD + 1234 = PIN. (ex. Date = 3/26/2012 -> 0326 + 1234 = 1560; With 1560 being the PIN number. I then need the PIN number to display as text, but that's the easy part, I really just need assistance with getting the date information in the proper format for the equation.

Using MS Equation Editor In VS2008?

Nov 17, 2009

after a lot of research on formatting Maths equations, apparently using MS equation edior is the easiest way to do it. But, I have no idea how to use it in VS 2008.

VS 2010 - MouseMove Equation ?

Dec 19, 2010

I am rotating a picture dependant on the mousemove.

Private Sub PictureBox1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseMove

[code]...

To simplify the part I am having problems with: rotationX = CurrentPositionX + ((InitialPositionX - MousePositonX) / SlowDownDivisor)

As an example, this occurs in both X and Y; If I click and drag in the X + Direction and release the mouse button it does exactly what I want, rotation in the positive direction. If I click and drag in the X + Direction and then drag in the X - direction, the rotation continues to be positive, it doesn't reverse. If I release the button and then click again and move in the X - direction the rotation is negative as it should, but it will continue to rotate in the negitive direction until the button is release.

Best Commercial DLL To Calculate Equation Of Any Complexity?

Mar 9, 2011

commercial dll to be used in vb.net to calculate equations of any complexity? pass an equation as a string form and to get the final result.

Concatenate A Equation And Answer To Text Box?

Mar 22, 2011

In our school theres a programming class and the teachers gone for the week and the sub is starting to get very frustrated, so I offered to help in any way i can. I have never programmed Visual Basic but I have programmed Ms-Dos, Javascript, HTML, *.vbs, *.ahk, *.gml, and a variety of other languages.

The class is going to build a program that calculate how many rabbits are born in a family. So when they click the button it shows in a text box the actual equation and then the answer after the equal sign that where i assume concatenation comes in.Here's the code I've thrown together for when the buttons pressed:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim RabitAmount As Integer
Dim ShowEquation As String

[code]....

I got the equation to answer it self and show in the text box but it won't show the equation?

Display An Equation Prior To Solving It?

Jul 19, 2011

I want to display an equation prior to solving it.  Obviously in MS word etc I can use equation editor to write an equation, but I'm writing my own program.

Is there an easy way to display an equation.  Obviously I could use text to write eg as text "a=b^2-3(c-d)/5" and everyone here would have little problem interpretting what I want but I want this to be accessible to 12 year old children.

Alternatively I could try and manipulate lots of text boxes one on top of the other to try and explain what I'm doing

The third alternative I thought of was to write in equation editor export the graphic and then import a graphic.

I'm sure I must be trying to reinvent the wheel - which I believe is the one thing OE programming is supposed to avoid.

Displaying The Equation And Answers In A Listbox?

Apr 27, 2012

First off the listbox needs to show the equations for the number entered between 0 and 12 example:

1+1=2
1+2=3
1+3=4

[Code]....

Equation - How To Display Number 7 In Label

Feb 20, 2009

I put this mathematical formula in VB 2008 Express Form and I have the result show in TextBox and every thing is good so far and my question is if I have a table of numbers for example if the answer in the TextBox is 0.00098 and my table show :
0.0001 to 0.00100 = 7
0.00101 to 0.002 = 8
0.00201 to 0.003 = 9
Etc
I need the number 7 to be displayed in label 1 so how can I do that?

Evaluating An Algebraic Equation And Getting The Answer?

Jun 19, 2009

I store a formula in the database such as the following:GrossIncome+(Overtime/0.5)-Deductions=BasicNetIncome

I am able to substitute the string representations with actually values entered, thus:1000+(150*0.5)-100=BasicNetIncome

Then I remove the '=BasicNetIncome', thus:
1000+(150*0.5)-100

How can evaluate the above equation to return a result:

[Code]...

Get Program To Re-adjust The Boolean Equation On The Fly?

May 30, 2012

I have a boolean condition that I want tthe program to recognize changes when they occur. Currently in order for the program to recognize a change I must restart the program.I have tried using a public timer but that didn't work.

Specifically.....

D1A.Close()
D1A = File.OpenText("MEASURE UNITS.TXT")

[code]....

I am re-writting the text file "MEASURE UNITS.TXT" labeled (D1B). Depending on this boolean equation different options become available in other parts of the program.I need the program to re-adjust the boolean equation on the fly.

How To Find Equation Of Curve Given Data Set (X / Y)

Jan 30, 2011

I am trying to write code in vb.net to find a equation when data points are given. For example (1,5),(2,6) etc. I need to find a equation(not necessarily always linear) from the given points. How do I calculate a trendline for a graph? How to get equation.