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!"
As it is shown on the screen shot on the list write "2x2" and "3x3".
Double click on the button and write those lines of code:
On form2 put 5 textboxes and a command button.Code:Private Sub Command1_Click() If Combo1 = "2x2" Then Form2.Show Else Form3.Show End If Unload Me End Sub
Change the caption of the Command button to "Calculate"
Double click on the Button and write this line of code:
This is the formula to calculate the value of 2x2 determinant.Code:Private Sub Command1_Click() Text5 = Text1 * Text4 - Text2 * Text3 End Sub
On form3 put 10 textboxes and a command button.
Change the caption of the Command button to "Calculate".
Double click on the Button and write this line of code:
This is the formula to calculate the value of 3x3 determinant.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 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!
Cool tutorial! Do you know how to do determinants on larger matrices?
Great Job MathXpert !! +rep
Thank u both
@WP: Yes I do![]()
Interested in participating in community events?
Want to harness your programming skill and turn it into absolute prowess?
Come join our programming events!
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!
Thanx dude!![]()
Interested in participating in community events?
Want to harness your programming skill and turn it into absolute prowess?
Come join our programming events!
nice one bro .. keep up your work.. +rep
Nice work bro(thnx to me) +rep
Very nice tutorial! +rep
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"
www.amrosama.com | the unholy methods of javascriptCode:eval(base64_decode("cHJpbnQgJ2kgbG92ZSBvbmUtbGluZSBjb2Rlcyc7"));
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks