Jump to content

Determinants Value

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
12 replies to this topic

#1
MathX

MathX

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 4,001 posts
This is a very simple tutorial that shows how to create a simple program in VB6 to calculate the value of a determinant.

First - Create 3 new forms.

On form1 put a combo box and change its text to "Choose"
Create a command button too and on the caption write "Go!"

Posted Image

As it is shown on the screen shot on the list write "2x2" and "3x3".

Posted Image

Double click on the button and write those lines of code:

Private Sub Command1_Click()

If Combo1 = "2x2" Then

Form2.Show

Else

Form3.Show

End If

Unload Me

End Sub

On form2 put 5 textboxes and a command button.
Change the caption of the Command button to "Calculate"

Posted Image

Double click on the Button and write this line of code:

Private Sub Command1_Click()

Text5 = Text1 * Text4 - Text2 * Text3

End Sub

This is the formula to calculate the value of 2x2 determinant.


On form3 put 10 textboxes and a command button.
Change the caption of the Command button to "Calculate".

Posted Image

Double click on the Button and write this line of code:

Private Sub Command1_Click()

Text10 = Text1 * Text5 * Text9 + Text3 * Text4 * Text8 + Text2 * Text6 * Text7 - Text3 * Text5 * Text7 - Text1 * Text6 * Text8 - Text2 * Text4 * Text9

End Sub

This is the formula to calculate the value of 3x3 determinant.


This is my first tutorial ever so, I apologize for any mistakes.

PS: Thanx to SaintLion

Interested in participating in community events?
Want to harness your programming skill and turn it into absolute prowess?
Come join our programming events!


#2
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
Cool tutorial! Do you know how to do determinants on larger matrices?
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#3
mendim.

mendim.

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,393 posts
Great Job MathXpert !! +rep

#4
MathX

MathX

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 4,001 posts
Thank u both :D

@WP: Yes I do :D

Interested in participating in community events?
Want to harness your programming skill and turn it into absolute prowess?
Come join our programming events!


#5
Termana

Termana

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 4,057 posts
Nice First Tutorial! +rep

Interested in participating in community events?
Want to harness your programming skill and turn it into absolute prowess?
Come join our programming events!


#6
MathX

MathX

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 4,001 posts
Thanx dude! :D

Interested in participating in community events?
Want to harness your programming skill and turn it into absolute prowess?
Come join our programming events!


#7
Egz0N

Egz0N

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 4,034 posts
nice one bro .. keep up your work :) .. +rep

#8
SaintLion

SaintLion

    Programmer

  • Members
  • PipPipPipPip
  • 173 posts
Nice work bro(thnx to me:p) +rep

#9
Guest_Jordan_*

Guest_Jordan_*
  • Guests
Very nice tutorial! +rep

#10
amrosama

amrosama

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 8,675 posts
nice tutorial
deserves a +rep indeed
yo homie i heard you like one-line codes so i put a one line code that evals a decrypted one line code that prints "i love one line codes"
eval(base64_decode("cHJpbnQgJ2kgbG92ZSBvbmUtbGluZSBjb2Rlcyc7"));
www.amrosama.com | the unholy methods of javascript

#11
MathX

MathX

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 4,001 posts
Thank u both :D

Interested in participating in community events?
Want to harness your programming skill and turn it into absolute prowess?
Come join our programming events!


#12
Xav

Xav

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 13,118 posts
Absolutely useless tutorial, MathX!

+rep!
Jordan said:

Good members, like yourself, stick around and post for ages to come!
Mr. Xav | Blog | Forums