Scour World

Home Blogs Videos Music Diary Files Friends Programming Books Store

Notepad Coder IDE: Pythagorean Theorem Calculator

June 27, 2022

Notepad Coder 6.0 IDE: Download

Code File: 106.zip

Lets Compute for different sides of a right triangle -- hypotenuse, side a and side b.

Its just notepad don't worry.

Notepad Coder IDE

1. Click the New Button to create Visual Basic Project Files (.vbproj ) called PythagoreanCalculator.vbproj

<PropertyGroup>

    <AssemblyName>PythagoreanCalculator</AssemblyName>

    <Version>1.0.0.0</Version>

    <Authors>Lawrence Albert Pardo-Ilao</Authors>

    <Company>Company Unlock For Us</Company>

    <Product>Pythagorean Calculator</Product>

    <AssemblyVersion>2.0.0.0</AssemblyVersion>

    <FileVersion>1.0.0.0</FileVersion>

    <NeutralLanguage>en</NeutralLanguage>

    <Description>Pythagorean Calculator using Computers</Description>

    <Copyright>Copyright @ 2022 All rights will be served</Copyright>


3. Go to Code Gen Button and lets draw the user interface.

Notepad Coder IDE

Edit the Designer Code and Form1 Code as shown below:

  Private Sub InitializeComponent()

    components = New System.ComponentModel.Container()


    Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font

    Me.ClientSize = New System.Drawing.Size(800, 450)

    Me.Text = "Pythagorean Calculator"

    Me.Size = New Size(338, 275)

    Me.StartPosition = FormStartPosition.CenterScreen

    Me.FormBorderStyle = FormBorderStyle.FixedSingle

    Me.MaximizeBox = False

    Me.ShowInTaskbar = True

    Me.Backcolor = System.Drawing.Color.White

    'Me.Icon = New System.Drawing.Icon("html.ico")

    btn0 = New Button()

    btn0.Name = "xbtn0"

    btn0.Text = "Compute"

    btn0.Font = New Font("Verdana", 9)

    btn0.Location = New Point(131, 174)

    btn0.Size = New Size(80, 35)

    btn0.Forecolor = System.Drawing.Color.Black

    btn0.Backcolor = System.Drawing.Color.White

    AddHandler btn0.Click, AddressOf btn0_Click

    Me.Controls.Add(btn0)

    Lbl0 = New Label()

    Lbl0.Name = "xLbl0"

    Lbl0.Text = "Pythagorean Calculator"

    'And many more code

    '=======================================


Click the Form1 Button and use the compiled code below:

Public Class Form1

  Inherits System.Windows.Forms.Form


  Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load


  End Sub


  Private Sub btn0_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)

      Dim a as Double = CDbl(Text0.Text)

      Dim b as Double = CDbl(Text1.Text)

      Dim h as Double = Math.Sqrt(a^2 + b^2)


      Lbl4.Text = Distance.ToString()

  End Sub

End Class



DOWNLOAD NOW: 106.zip


Have Fun!




Visitors: 5784


Copyright @2022, All rights will be served.