How to Program Quadratic Equations solver (VB)?


How to Program Quadratic Equations solver (VB)?

How to Program Quadratic Equations solver (VB)?

Hello all. This is our first tutorial after a long time of being under maintenance. In this tutorial we are going to learn how to program an app in visual basic that can solve quadratic equations.

A quadratic equation is a second-degree polynomial that has the form “ax^2 + bx + c = 0.” The “a,” “b” and “c” are the constants and “x” is the variable. When you solve a quadratic equation, you must have the values of the constants and solve for x, which always yields two values, called the “roots.” In Visual Basic, you can write a program or function that prompts the user to enter the a, b and c values, find the roots and then display the values on the form.

Lets start

    1. Add 3 textbox and Change the name of them to TxtA1 and TxtB1 TxtC1
    2. Add a label and name it to LblM1
    3. Add 6 labels and name them to Labelx , Labelx2 , lbldelta2 , lbldelta , LblAns2 and LblAns1
    4. Set the visible of these 6 labels to False
    5. Add a button and name it to Cmd1


vb objects for quadratic equations


  1.  Now just paste this code. ( I explained the codes function in green line)


Coded By: Danial Nikbin


  1. Nice tutorial but it’s a little confusing for me 😀

  2. Nice program, reminds me a lot of my calculator program because it was coded in Visual Basic. Nice work, keep it up founder. 😀


Submit a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.