Sabtu, 31 Maret 2012

CARA MEMASUKAN KARAKTER ( ' ) KE DALAM SQL SERVER (Entering the CHARACTER (') INTO THE SQL SERVER) CODE IN .NET


PREVIEW:

Ketika kita ingin memasukan karakter ( ' ) dalam queri string, dalam pengeksekusiannya pasti terjadi error,,,,karena  karakter ( ' ) akan dibaca sebagai perintah Query...

Banyak para Programer menggunakan escape,tapi terlalu rumit....ada juga yang menggunakan fungsi replace sebagai handle...tapi semua tidak menyelesaikan masalah seperti yang  harapkan...

Berikut ini saya coba kasih hendle buat ngatasi masalah itu,,,, yaitu dengan mengganti karakter ( ' ) dengan karakter yang mirip karakter tersebut, yaitu karakter ( ` )...

Untuk mengatasi hal seperti ini saya lebih suka menghandle lewat inputan, bukan lewat querynya,,,karena Query nanti akan berisi gabungan string buat perintah dan string inputan dari textbox...

Dan yang akan saya handle adalah textbox nya, yaitu ketika user mmemilih Karakter ( ' ), Maka akan saya alihkan ke karakter ( ` )....

CODE HANDLE :
Private Sub EnterKeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) _
    Handles TextBox1.KeyPress, TextBox2.KeyPress, TextBox3.KeyPress, TextBox4.KeyPress
        Try
            e.KeyChar = UCase(e.KeyChar)
            If e.KeyChar = "'" Then
                e.KeyChar = "`"
            End If
            
        Catch ex As Exception
            MessageBox.Show(ex.Message)
        End Try
    End Sub
DOWNLOAD PROJECT :

UNTUK MENCOBA QUERY STRINGNYA,SILAHKAN COPY N JALANKAN DI QUERY ANALIZER....

ATAU SILAHKAN ANDA BUAT CODE UNTUK MENGEKSEKUSI QUERY TERSEBUT...

OK, SEMOGA BERMANFAAT...



Jumat, 09 Maret 2012

(Insert) TextBox / Variable into Crystal Report Parameter (Code in .Net)

1) Add/ Tambahkan Crystal  Report dan CrystalReportViewer ke dalam Form project Anda
2) pada
Crystal  Report tambahkan field parameter, contoh kita beri nama "Nomor" Field.

3) Lalu Masukan field parameter "nomor" tadi kedalam crystalreport
4)
Nanti dalam crystal report  akan terlihat - "?nomor"
5) Tuliskan syntax berikut dalam form dimana anda meletakan
CrystalReportViewer 
    
  CODE :
private sub print()
Dim pvCollection As New CrystalDecisions.Shared.ParameterValues()
Dim pdvFrom As New CrystalDecisions.Shared.ParameterDiscreteValue()
Dim ObjectRpt As New CryStalreport1
Dim CryData As New CrystalReportViewer1

pdvFrom.Value = textbox1.text       ' value parameter field
      
 pvCollection.Add(pdvFrom)           ' add value
ObjectRpt.DataDefinition.ParameterFields("nomor").ApplyCurrentValues(pvCollection)
CryData.ReportSource = ObjectRpt
 CryData.Refresh()
End Sub


..::S E L A M A T  M E N C O B A::..

Rabu, 07 Maret 2012

Memberi Warna pada Section Detail (Record) Crytal report

Memberi warna pada section detail (record) kadang sangat diperlukan untuk mempermudah user membaca laporan,,

PREVIEW :


Ok. berikut caranya :
1.  Klik Kanan pada section(details), Pilih section expert
 2. pilih "details" pada kolom section, pilih color pada kolom sebelah kanan lalu centang background color


 3. Buat formula baru,setelah Masuk formula Editor, pada kolom sebelah kiri pilih "Formating Formula=>Details", lalu klik kanan,terus pilih "New Formating Formula=>background color" klik use editor
4. Dalam code editor ketik formula serti ini :

if RecordNumber mod 2=0 then crSilver else crNoColor

5. Simpan dan tutup Editor
6. Kemudian jalankan report

Selamat mencoba.




Fungsi ISNULL Dalam Ms SQL

Fungsi   dari IS NULL  itu sendiri adalah Menggantikan NULL dengan nilai pengganti yang ditentukan..
  
SYNTAX :

ISNULL ( EKSPRESI ,NILAI PENGGANTI



KETERANGAN :
EKSPRESI : Ekspresi berisi nilai/field yang akan di cek, Bila Nilai/Field is null maka nilai/field akan diganti
                     dengan PENGGANTI.


CONTOH:

SELECT     NOPINJAM, KODE_NASABAH, TGLANGSUR, TGLPINJAM,
 ISNULL(DATEDIFF(DAY, TGLANGSUR, GETDATE()), DATEDIFF(DAY, TGLPINJAM, GETDATE())) AS [JATUH TEMPO], SISAANGSUR, ROUND(JMLPINJAM * BUNGA / 100 * 12 / 360 * ISNULL(DATEDIFF(DAY, TGLANGSUR, GETDATE()), DATEDIFF(DAY,
                      TGLPINJAM, GETDATE())) + 450, - 3) AS BUNGA
FROM         VIEWPINJAM
WHERE     (LUNAS = 0) AND (JENISBIAYA = N'MENURUN') AND (ISNULL(DATEDIFF(DAY, TGLANGSUR, GETDATE()), DATEDIFF(DAY, TGLPINJAM, GETDATE())) > 0)

 HASIL:




Perhatikan Syntax yg diblok biru, Maksud dari syntax tersebut adalah menghitung jumlah hari keterlambatan(jatuh Tempo) dengan parameter fungsi Is Null "TGLANGSUR", Bila "TGLANGSUR" Is Null maka parameter penghitungan hari diambil dari "TGLPINJAM" dan apa bila "TGLANGSUR" Is Not Null maka parameter penghitungan hari diambil dari "TGLANGSUR"..

OK, Untuk lebih jelas nya Perhatikan Blok warna dalam syntax diatas:
=> Blok HIJAU : * adalah fungsi menghitung hari dengan parameter "TGLANGSUR"
                            * bila "TGLANGSUR" Is Null Maka otomatis fungsi datediff ga jalan
                            * dan hasilnya field alias "JATUH TEMPO" = Is Null
                            * dan apabila "TGLANGSUR" Is Not Null maka penghitungan hari (fungsi gatediff) 
                               diambil dari "TGLANGSUR"
=> Setelah Pengecekan diatas maka diketahui Parameternya Is Null atau Is Not Null, Jika Is Not Null Maka Blok HIJAU yg akan dibaca, dan Jika Is Null Maka yg akan dibaca adalah fungsi getediff yg kedua (Blok HITAM), dengan parameter "TGLPINJAM"...


Wes ah penjelasane, Kesel,ngeleh,,,,,
Paham KarepMU ora paham Yo Matamu....jenenge ae ngoding sak karepe deweeeeeeeeee

hehehehe... Guyon Um,,, Pastilah anda lebih paham daripada saya... 

OK, Semoga Bermanfaat....!!!!!
 

Senin, 05 Maret 2012

Multi coloum ComboBox .Net

Preview :


 Berikut Cara menambahkan kolom pada ComboBox , monggo download ae contohe:
Download Project

Multibox(user Control) :

Imports System.Math
Imports System.Drawing
Imports System.Windows.Forms

Public Class Multibox

#Region "Dimensions"
    Dim charSeperator As Char = ","         'Character seperation in the main box
    Dim intSelectedItem As Int16 = 0        'Index of the currently selected item
#End Region

#Region "Properties"

    Public Property Seperator() As Char     'The column seperator property
        Get
            Return charSeperator
        End Get
        Set(ByVal value As Char)
            charSeperator = value
        End Set
    End Property

    'Hide this property from designer window
    <System.ComponentModel.Browsable(False)> _
    ReadOnly Property Columns() As ListView.ColumnHeaderCollection      'Columns in the Listview
        Get
            Return ListView1.Columns
        End Get
    End Property

    'Hide this property from designer window
    <System.ComponentModel.Browsable(False)> _
    ReadOnly Property Items() As ListView.ListViewItemCollection        'Items in the listview
        Get
            Return ListView1.Items
        End Get
    End Property

#End Region

#Region "Show list"

    Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
        'Hide and show the listview as the drop list for the box
        If ListView1.Visible Then
            ListView1.Visible = False
            Me.Height = Me.Height - ListView1.Height - 5
        Else
            ListView1.Left = TextBox1.Left
            ListView1.Width = TextBox1.Width
            ListView1.Top = TextBox1.Bottom
            ListView1.Visible = True
            Me.Height = Me.Height + ListView1.Height + 5
            ListView1.Items(intSelectedItem).Selected = True
        End If

    End Sub

    Private Sub TextBox1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.Click
        Button1_Click(sender, e)
    End Sub

    Private Sub ListView1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ListView1.Click
        Button1_Click(sender, e)
    End Sub

#End Region

#Region "Select Item"

    Private Sub ListView1_ItemSelectionChanged(ByVal sender As Object, ByVal e As System.Windows.Forms.ListViewItemSelectionChangedEventArgs) Handles ListView1.ItemSelectionChanged
        Try
            'Set the selected index number
            intSelectedItem = ListView1.SelectedItems(0).Index

            'Set the count to 0 for Item seperator
            Dim i As Int16 = 0

            'Loop through the items and get the values
            For Each tmpItem In ListView1.SelectedItems(0).SubItems
                If i = 0 Then
                    TextBox1.Text = tmpItem.Text
                Else
                    TextBox1.Text += charSeperator & " " & tmpItem.Text
                End If
                i += 1
            Next
        Catch ex As Exception
            'Just leave the exception and move on.
        End Try
    End Sub

#End Region

#Region "Fade in and out"

    Private Sub TextBox1_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.MouseEnter
        Fade(Button1, True)
    End Sub

    Private Sub TextBox1_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.MouseLeave
        Fade(Button1, False)
    End Sub

    Private Sub Button1_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.MouseEnter
        Dim cntrl As Control = CType(sender, Control)
        Fade(cntrl, True)
    End Sub

    Private Sub Button1_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.MouseLeave
        Dim cntrl As Control = CType(sender, Control)
        Fade(cntrl, False)
    End Sub

    Private Sub Fade(ByVal ctrl As Control, ByVal hovering As Boolean)
       

        Dim Sb_R, Sb_G, Sb_B As Int16 '           <--- RGB values for the starting backcolor
        Dim Sf_R, Sf_G, Sf_B As Int16 '           <--- RGB values for the starting forecolor
        Dim Eb_R, Eb_G, Eb_B As Int16 '           <--- RGB values for the ending backcolor
        Dim Ef_R, Ef_G, Ef_B As Int16 '           <--- RGB values for the ending forecolor

        Select Case hovering  ' True for MouseEnter, False for MouseLeave
            Case True
                Sb_R = SystemColors.Window.R           ' Assign the variables the
                Sb_G = SystemColors.Window.G           ' appropriate values based
                Sb_B = SystemColors.Window.B           ' on system-defined colors
                '                                         for control and control
                Sf_R = SystemColors.Window.R       ' text.
                Sf_G = SystemColors.Window.G
                Sf_B = SystemColors.Window.B

                Eb_R = SystemColors.ActiveCaption.R     ' Assign the variables the
                Eb_G = SystemColors.ActiveCaption.G     ' appropriate values based
                Eb_B = SystemColors.ActiveCaption.B     ' on system-defined colors
                '                                         for the title bar and the
                Ef_R = SystemColors.ActiveCaptionText.R ' title bar's text.
                Ef_G = SystemColors.ActiveCaptionText.G
                Ef_B = SystemColors.ActiveCaptionText.B
            Case False
                Sb_R = SystemColors.ActiveCaption.R     ' Assign the variables the
                Sb_G = SystemColors.ActiveCaption.G     ' appropriate values based
                Sb_B = SystemColors.ActiveCaption.B     ' on system-defined colors
                '                                         for the title bar and the
                Sf_R = SystemColors.ActiveCaptionText.R ' title bar's text.
                Sf_G = SystemColors.ActiveCaptionText.G
                Sf_B = SystemColors.ActiveCaptionText.B

                Eb_R = SystemColors.Window.R           ' Assign the variables the
                Eb_G = SystemColors.Window.G           ' appropriate values based
                Eb_B = SystemColors.Window.B           ' on system-defined colors
                '                                         for control and control
                Ef_R = SystemColors.Window.R       ' text.
                Ef_G = SystemColors.Window.G
                Ef_B = SystemColors.Window.B
        End Select

        Dim b_RIncrement As Int16 = Round(((Eb_R - Sb_R) / 16), 0)      ' Find the increments that
        Dim b_GIncrement As Int16 = Round(((Eb_G - Sb_G) / 16), 0)      ' the RGB values will take;
        Dim b_BIncrement As Int16 = Round(((Eb_B - Sb_B) / 16), 0)      ' 1/16th of the difference
        '                                                                 between the start and end
        Dim f_RIncrement As Int16 = Round(((Ef_R - Sf_R) / 16), 0)      ' values, rounded to the
        Dim f_GIncrement As Int16 = Round(((Ef_G - Sf_G) / 16), 0)      ' nearest integer.
        Dim f_BIncrement As Int16 = Round(((Ef_B - Sf_B) / 16), 0)

        Dim bR As Int16 = Sb_R ' \
        Dim bG As Int16 = Sb_G '  }--  the RGB values for the backcolor as it changes.
        Dim bB As Int16 = Sb_B ' /

        Dim fR As Int16 = Sf_R ' \
        Dim fG As Int16 = Sf_G '  }--  the RGB values for the forecolor as it changes.
        Dim fB As Int16 = Sf_B ' /

        Dim count As Int16
        For count = 0 To 14
            bR += b_RIncrement          ' Add the appropriate increments to the
            bG += b_GIncrement          ' RGB values.  The result is a nifty
            bB += b_BIncrement          ' "cross-fade" effect.
            fR += f_RIncrement
            fG += f_GIncrement
            fB += f_BIncrement

            'ctrl.BackColor = Color.FromArgb(bR, bG, bB)   ' Repaint the button using the
            ctrl.ForeColor = Color.FromArgb(fR, fG, fB)   ' current RGB values, and refresh
            ctrl.Refresh()                                ' the button.

            Threading.Thread.Sleep(30 - (count * 2))      ' Wait a certain number of milliseconds,
            '                                               which is a factor of the current count.
            '                                               I tweaked these numbers to get a decent
            '                                               effect; feel free to adjust these
            '                                               numbers to achieve an effect you like.
        Next
        Select Case hovering
            Case True
                ctrl.BackColor = SystemColors.ActiveCaption         ' Finish the effect by painting
                ctrl.ForeColor = SystemColors.ActiveCaptionText     ' the control with it's final
            Case False                                              ' look, depending on whether
                ctrl.BackColor = SystemColors.Window               ' we're fading in or out.
                ctrl.ForeColor = SystemColors.Window
        End Select
    End Sub

#End Region

#Region "Component resize and new"

    Private Sub Multibox_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Resize
        If ListView1.Visible = False Then
            Me.Height = 26
        End If
    End Sub

    Public Sub New()

        ' This call is required by the Windows Form Designer.
        InitializeComponent()

        ' Add any initialization after the InitializeComponent() call.
        ListView1.MultiSelect = False
        ListView1.FullRowSelect = True
    End Sub

#End Region

    Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged

    End Sub
End Class
 

Form:

        Multibox1.Columns.Add("Nama")
        Multibox1.Columns.Add("Panggilan")

        Multibox1.Items.Add("Mas Semar")
        Multibox1.Items(0).SubItems.Add("Semar")
        Multibox1.Items.Add("Petruk")
        Multibox1.Items(1).SubItems.Add("Truk")





Minggu, 04 Maret 2012

BACKUP RESTORE DATABASE MS SQL SERVER (CODE IN VB.NET)

PREVIEW :





















DOWNLOAD CONTOH PROJECT



CODE :

Imports System.Data.SqlClient
Public Class Form1
    Dim con, con1 As SqlConnection
    Dim cmd As SqlCommand
    Dim dread As SqlDataReader
  
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        server(".")
        server("IC-COMP")
    End Sub
    Sub server(ByVal str As String)
        con = New SqlConnection("Data Source=" & str & ";Database=Master;integrated security=SSPI;")
        con.Open()
        cmd = New SqlCommand("select *  from sysservers  where srvproduct='SQL Server'", con)
        dread = cmd.ExecuteReader
        While dread.Read
            cmbserver.Items.Add(dread(2))
        End While
        dread.Close()
    End Sub
    Sub connection()
        con = New SqlConnection("Data Source=" & Trim(cmbserver.Text) & ";Database=Master;integrated security=SSPI;")
        con.Open()
        cmbdatabase.Items.Clear()
        cmd = New SqlCommand("select * from sysdatabases", con)
        dread = cmd.ExecuteReader
        While dread.Read
            cmbdatabase.Items.Add(dread(0))
        End While
        dread.Close()
    End Sub

    Private Sub cmbserver_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmbserver.SelectedIndexChanged
        connection()
    End Sub
    Sub query(ByVal que As String)
        On Error Resume Next
        cmd = New SqlCommand(que, con)
        cmd.ExecuteNonQuery()
    End Sub
    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        If ProgressBar1.Value = 100 Then
            Timer1.Enabled = False
            ProgressBar1.Visible = False
            MsgBox("SUKSES")
        Else
            ProgressBar1.Value = ProgressBar1.Value + 5
        End If
    End Sub
    Sub blank(ByVal str As String)
        If cmbserver.Text = "" Or cmbdatabase.Text = "" Then
            MsgBox("SERVER & Database KOSONG")
            Exit Sub
        Else
            If str = "backup" Then
                SaveFileDialog1.FileName = cmbdatabase.Text
                SaveFileDialog1.ShowDialog()
                Timer1.Enabled = True
                ProgressBar1.Visible = True
                Dim s As String
                s = SaveFileDialog1.FileName
                query("backup database " & cmbdatabase.Text & " to disk='" & s & "'")
            ElseIf str = "restore" Then
                OpenFileDialog1.ShowDialog()
                Timer1.Enabled = True
                ProgressBar1.Visible = True
                query("RESTORE DATABASE " & cmbdatabase.Text & " FROM disk='" & OpenFileDialog1.FileName & "'")
            End If
        End If
    End Sub
    Private Sub cmbbackup_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmbbackup.Click
        blank("backup")
    End Sub

    Private Sub cmdrestore_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdrestore.Click
        blank("restore")
    End Sub
End Class




Membuat Pesan(massagebox) Animasi dengan Microsoft Agent VB.NET

PREVIEW :



















Untuk mengetahui Ms Agent terlebih dahulu silahkan baca disini : MSDN

 DOWNLOAD CONTOH PROJECT





CLASS :

Public Class clsAnimation
    Dim App As New AppPath()
    Private Shared Characther As AgentObjects.IAgentCtlCharacter
    Private Shared agentController As New AgentObjects.Agent()
    Public a As String
    'Public bas As Boolean
    Public Sub loadAgent()
        On Error GoTo ErrMsg
        a = "merlin.acs"

        Dim iChar As String = ""

        iChar = App.GetPath + a

        With agentController
            .Connected = True
            .Characters.Load(a, iChar)
            Characther = .Characters(a)
        End With

        Characther.Show()

        Exit Sub
ErrMsg:
        MsgBox(Err.Description)
    End Sub

    Public Sub playAgent(ByVal Action As String)
        With Characther

            .Play(Action)
        End With
    End Sub

    Public Sub speakAgent(ByVal Sound As String)
        With Characther
            .Speak(Sound)
            .SoundEffectsOn = True
        End With
    End Sub

    Public Sub stopPlay()
        With Characther
            .Stop()

        End With
    End Sub

End Class

FORM :


Public Class Form1
    Inherits System.Windows.Forms.Form
    Public bas As Boolean

#Region " Windows Form Designer generated code "

    Public Sub New()
        MyBase.New()

        'This call is required by the Windows Form Designer.
        InitializeComponent()

        'Add any initialization after the InitializeComponent() call

    End Sub

    'Form overrides dispose to clean up the component list.
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is Nothing) Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer. 
    'Do not modify it using the code editor.
    Friend WithEvents cboanimation As System.Windows.Forms.ComboBox
    Friend WithEvents Label1 As System.Windows.Forms.Label
    Friend WithEvents Label2 As System.Windows.Forms.Label
    Friend WithEvents cboloopanimation As System.Windows.Forms.ComboBox
    Friend WithEvents Label3 As System.Windows.Forms.Label
    Friend WithEvents txtspeech As System.Windows.Forms.TextBox
    Friend WithEvents btnanimation As System.Windows.Forms.Button
    Friend WithEvents btnloopanimation As System.Windows.Forms.Button
    Friend WithEvents btnspeech As System.Windows.Forms.Button
    Friend WithEvents Button1 As System.Windows.Forms.Button
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.cboanimation = New System.Windows.Forms.ComboBox()
        Me.Label1 = New System.Windows.Forms.Label()
        Me.Label2 = New System.Windows.Forms.Label()
        Me.cboloopanimation = New System.Windows.Forms.ComboBox()
        Me.Label3 = New System.Windows.Forms.Label()
        Me.txtspeech = New System.Windows.Forms.TextBox()
        Me.btnanimation = New System.Windows.Forms.Button()
        Me.btnloopanimation = New System.Windows.Forms.Button()
        Me.btnspeech = New System.Windows.Forms.Button()
        Me.Button1 = New System.Windows.Forms.Button()
        Me.SuspendLayout()
        '
        'cboanimation
        '
        Me.cboanimation.Items.AddRange(New Object() {"Acknowledge", "Alert", "Announce", "Blink", "Confused", "Congratulate", "Congratulate_2", "Decline", "DoMagic1", "DoMagic2", "DontRecognize", "Explain", "GestureDown", "GestureLeft", "GestureRight", "GestureUp", "GetAttention", "GetAttentionContinued", "GetAttentionReturn", "Greet", "Hide", "Idle1_1", "Idle1_2", "Idle1_3", "Idle1_4", "Idle2_1", "Idle2_2", "Idle3_1", "LookDown", "LookDownBlink", "LookDownReturn", "LookLeft", "LookLeftBlink", "LookLeftReturn", "LookRight", "LookRightBlink", "LookRightReturn", "LookUp", "LookUpBlink", "LookUpReturn", "MoveDown", "MoveLeft", "MoveRight", "MoveUp", "Pleased", "Process", "Read", "ReadContinued", "ReadReturn", "RestPose", "Sad", "Search", "Show", "StartListening", "StopListening", "Suggest", "Surprised", "Think", "Uncertain", "Wave", "Write", "WriteContinued", "WriteReturn"})
        Me.cboanimation.Location = New System.Drawing.Point(88, 8)
        Me.cboanimation.Name = "cboanimation"
        Me.cboanimation.Size = New System.Drawing.Size(121, 21)
        Me.cboanimation.TabIndex = 0
        '
        'Label1
        '
        Me.Label1.AutoSize = True
        Me.Label1.Location = New System.Drawing.Point(0, 8)
        Me.Label1.Name = "Label1"
        Me.Label1.Size = New System.Drawing.Size(55, 13)
        Me.Label1.TabIndex = 1
        Me.Label1.Text = "Animation"
        '
        'Label2
        '
        Me.Label2.AutoSize = True
        Me.Label2.Location = New System.Drawing.Point(0, 40)
        Me.Label2.Name = "Label2"
        Me.Label2.Size = New System.Drawing.Size(83, 13)
        Me.Label2.TabIndex = 2
        Me.Label2.Text = "Loop Animation"
        '
        'cboloopanimation
        '
        Me.cboloopanimation.Items.AddRange(New Object() {"Hearing_1", "Hearing_2", "Hearing_3", "Hearing_4", "Idle3_2", "Processing", "Reading", "Searching", "Thinking", "Writing"})
        Me.cboloopanimation.Location = New System.Drawing.Point(88, 40)
        Me.cboloopanimation.Name = "cboloopanimation"
        Me.cboloopanimation.Size = New System.Drawing.Size(121, 21)
        Me.cboloopanimation.TabIndex = 3
        '
        'Label3
        '
        Me.Label3.AutoSize = True
        Me.Label3.Location = New System.Drawing.Point(0, 72)
        Me.Label3.Name = "Label3"
        Me.Label3.Size = New System.Drawing.Size(43, 13)
        Me.Label3.TabIndex = 4
        Me.Label3.Text = "Speech"
        '
        'txtspeech
        '
        Me.txtspeech.Location = New System.Drawing.Point(88, 72)
        Me.txtspeech.Name = "txtspeech"
        Me.txtspeech.Size = New System.Drawing.Size(120, 20)
        Me.txtspeech.TabIndex = 5
        Me.txtspeech.Text = ""
        '
        'btnanimation
        '
        Me.btnanimation.Location = New System.Drawing.Point(216, 8)
        Me.btnanimation.Name = "btnanimation"
        Me.btnanimation.TabIndex = 6
        Me.btnanimation.Text = "Do"
        '
        'btnloopanimation
        '
        Me.btnloopanimation.Location = New System.Drawing.Point(216, 40)
        Me.btnloopanimation.Name = "btnloopanimation"
        Me.btnloopanimation.TabIndex = 7
        Me.btnloopanimation.Text = "Do"
        '
        'btnspeech
        '
        Me.btnspeech.Location = New System.Drawing.Point(216, 72)
        Me.btnspeech.Name = "btnspeech"
        Me.btnspeech.TabIndex = 8
        Me.btnspeech.Text = "Speak"
        '
        'Button1
        '
        Me.Button1.Location = New System.Drawing.Point(216, 104)
        Me.Button1.Name = "Button1"
        Me.Button1.TabIndex = 9
        Me.Button1.Text = "Stop"
        '
        'Form1
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
        Me.ClientSize = New System.Drawing.Size(304, 142)
        Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.Button1, Me.btnspeech, Me.btnloopanimation, Me.btnanimation, Me.txtspeech, Me.Label3, Me.cboloopanimation, Me.Label2, Me.Label1, Me.cboanimation})
        Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow
        Me.Name = "Form1"
        Me.Text = "Bring Happiness to u."
        Me.ResumeLayout(False)

    End Sub

#End Region
    Dim App As New AppPath()
    Dim ANI As New clsAnimation()
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        cboanimation.SelectedIndex = 0
        cboloopanimation.SelectedIndex = 0
        ANI.loadAgent()
        ANI.playAgent("GetAttentionContinued")
        ANI.speakAgent("i love indonesia")
    End Sub

    Private Sub btnanimation_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnanimation.Click
        ANI.playAgent(cboanimation.Text)
    End Sub

    Private Sub btnloopanimation_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnloopanimation.Click
        ANI.stopPlay()

        cboanimation.SelectedIndex = 1
        cboloopanimation.SelectedIndex = 1
        bas = True
        ANI.loadAgent()
        ANI.playAgent(cboanimation.Text)
        'ANI.speakAgent(cboloopanimation.Text)


    End Sub

    Private Sub btnspeech_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnspeech.Click
        ANI.speakAgent(txtspeech.Text)
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        ANI.stopPlay()
    End Sub

End Class






Sabtu, 03 Maret 2012

Kalkulator untuk menghitung matrix (matrix calculator) vb.net

PREVIEW :





























CLASS :

Option Strict Off
Option Explicit On

Imports System.Math

Public Class MatLib
    Private Shared Sub Find_R_C(ByVal Mat(,) As Double, ByRef Row As Integer, ByRef Col As Integer)
        Row = Mat.GetUpperBound(0)
        Col = Mat.GetUpperBound(1)
    End Sub

#Region "Add Matrices"

    Public Shared Function Add(ByVal Mat1(,) As Double, ByVal Mat2(,) As Double) As Double(,)
        Dim sol(,) As Double
        Dim i, j As Integer
        Dim Rows1, Cols1 As Integer
        Dim Rows2, Cols2 As Integer

        On Error GoTo Error_Handler

        Find_R_C(Mat1, Rows1, Cols1)
        Find_R_C(Mat2, Rows2, Cols2)

        If Rows1 <> Rows2 Or Cols1 <> Cols2 Then
            GoTo Error_Dimension
        End If

        ReDim sol(Rows1, Cols1)
        For i = 0 To Rows1
            For j = 0 To Cols1
                sol(i, j) = Mat1(i, j) + Mat2(i, j)
            Next j
        Next i

        Return sol

Error_Dimension:
        Err.Raise("5005", , "Dimensions of the two matrices do not match !")

Error_Handler:
        If Err.Number = 5005 Then
            Err.Raise("5005", , "Dimensions of the two matrices do not match !")
        Else
            Err.Raise("5022", , "One or both of the matrices are null, this operation cannot be done !!")
        End If

    End Function
#End Region

#Region "Subtract Matrices"
  
    Public Shared Function Subtract(ByVal Mat1(,) As Double, ByVal Mat2(,) As Double) As Double(,)
        Dim i, j As Integer
        Dim sol(,) As Double
        Dim Rows1, Cols1 As Integer
        Dim Rows2, Cols2 As Integer

        On Error GoTo Error_Handler

        Find_R_C(Mat1, Rows1, Cols1)
        Find_R_C(Mat2, Rows2, Cols2)

        If Rows1 <> Rows2 Or Cols1 <> Cols2 Then
            GoTo Error_Dimension
        End If

        ReDim sol(Rows1, Cols1)

        For i = 0 To Rows1
            For j = 0 To Cols1
                sol(i, j) = Mat1(i, j) - Mat2(i, j)
            Next j
        Next i

        Return sol

Error_Dimension:
        Err.Raise("5007", , "Dimensions of the two matrices do not match !")

Error_Handler:
        If Err.Number = 5007 Then
            Err.Raise("5007", , "Dimensions of the two matrices do not match !")
        Else
            Err.Raise("5022", , "One or both of the matrices are null, this operation cannot be done !!")
        End If

    End Function

#End Region

#Region "Multiply Matrices"
  
    Public Shared Function Multiply(ByVal Mat1(,) As Double, ByVal Mat2(,) As Double) As Double(,)
        Dim l, i, j As Integer
        Dim OptiString As String
        Dim sol(,) As Double, MulAdd As Double
        Dim Rows1, Cols1 As Integer
        Dim Rows2, Cols2 As Integer

        On Error GoTo Error_Handler

        MulAdd = 0

        Find_R_C(Mat1, Rows1, Cols1)
        Find_R_C(Mat2, Rows2, Cols2)

        If Cols1 <> Rows2 Then
            GoTo Error_Dimension
        End If

        ReDim sol(Rows1, Cols2)

        For i = 0 To Rows1
            For j = 0 To Cols2
                For l = 0 To Cols1
                    MulAdd = MulAdd + Mat1(i, l) * Mat2(l, j)
                Next l
                sol(i, j) = MulAdd
                MulAdd = 0
            Next j
        Next i

        Return sol

Error_Dimension:
        Err.Raise("5009", , "Dimensions of the two matrices not suitable for multiplication !")

Error_Handler:
        If Err.Number = 5009 Then
            Err.Raise("5009", , "Dimensions of the two matrices not suitable for multiplication !")
        Else
            Err.Raise("5022", , "One or both of the matrices are null, this operation cannot be done !!")
        End If

    End Function

#End Region

#Region "Determinant of a Matrix"
 
    Public Shared Function Det(ByVal Mat(,) As Double) As Double
        Dim DArray(,) As Double, S As Integer
        Dim k, k1, i, j As Integer
        Dim save, ArrayK As Double
        Dim M1 As String
        Dim Rows, Cols As Integer

        On Error GoTo Error_Handler

        Find_R_C(Mat, Rows, Cols)

        If Rows <> Cols Then GoTo Error_Dimension

        S = Rows
        Det = 1
        DArray = Mat.Clone()

        For k = 0 To S
            If DArray(k, k) = 0 Then
                j = k
                Do While ((j < S) And (DArray(k, j) = 0))
                    j = j + 1
                Loop
                If DArray(k, j) = 0 Then
                    Det = 0
                    Exit Function
                Else
                    For i = k To S
                        save = DArray(i, j)
                        DArray(i, j) = DArray(i, k)
                        DArray(i, k) = save
                    Next i
                End If

                Det = -Det
            End If
            ArrayK = DArray(k, k)
            Det = Det * ArrayK
            If k < S Then
                k1 = k + 1
                For i = k1 To S
                    For j = k1 To S
                        DArray(i, j) = DArray(i, j) - DArray(i, k) * (DArray(k, j) / ArrayK)
                    Next j
                Next i
            End If
        Next

        Exit Function

Error_Dimension:
        Err.Raise("5011", , "Matrix should be a square matrix !")

Error_Handler:
        If Err.Number = 5011 Then
            Err.Raise("5011", , "Matrix should be a square matrix !")
        Else
            Err.Raise("5022", , "In order to do this operation values must be assigned to the matrix !!")
        End If
    End Function

#End Region

#Region "Inverse of a Matrix"
 
    Public Shared Function Inv(ByVal Mat(,) As Double) As Double(,)
        Dim AI(,) As Double, AIN As Double, AF As Double, _
            Mat1(,) As Double
        Dim LL As Integer, LLM As Integer, L1 As Integer, _
            L2 As Integer, LC As Integer, LCA As Integer, _
            LCB As Integer, i As Integer, j As Integer
        Dim Rows, Cols As Integer

        On Error GoTo Error_Handler

        Find_R_C(Mat, Rows, Cols)
        If Rows <> Cols Then GoTo Error_Dimension

        If Det(Mat) = 0 Then GoTo Error_Zero

        LL = Rows
        LLM = Cols
        Mat1 = Mat.Clone()
        ReDim AI(LL, LL)

        For L2 = 0 To LL
            For L1 = 0 To LL
                AI(L1, L2) = 0
            Next
            AI(L2, L2) = 1
        Next

        For LC = 0 To LL
            If Abs(Mat1(LC, LC)) < 0.0000000001 Then
                For LCA = LC + 1 To LL
                    If LCA = LC Then GoTo 1090
                    If Abs(Mat1(LC, LCA)) > 0.0000000001 Then
                        For LCB = 0 To LL
                            Mat1(LCB, LC) = Mat1(LCB, LC) + Mat1(LCB, LCA)
                            AI(LCB, LC) = AI(LCB, LC) + AI(LCB, LCA)
                        Next
                        GoTo 1100
                    End If
1090:           Next
            End If

1100:
            AIN = 1 / Mat1(LC, LC)
            For LCA = 0 To LL
                Mat1(LCA, LC) = AIN * Mat1(LCA, LC)
                AI(LCA, LC) = AIN * AI(LCA, LC)
            Next

            For LCA = 0 To LL
                If LCA = LC Then GoTo 1150
                AF = Mat1(LC, LCA)
                For LCB = 0 To LL
                    Mat1(LCB, LCA) = Mat1(LCB, LCA) - AF * Mat1(LCB, LC)
                    AI(LCB, LCA) = AI(LCB, LCA) - AF * AI(LCB, LC)
                Next
1150:       Next

        Next

        Return AI

Error_Zero:
        Err.Raise("5012", , "Determinent equals zero, inverse can't be found !")

Error_Dimension:
        Err.Raise("5014", , "Matrix should be a square matrix !")

Error_Handler:
        If Err.Number = 5012 Then
            Err.Raise("5012", , "Determinent equals zero, inverse can't be found !")
        ElseIf Err.Number = 5014 Then
            Err.Raise("5014", , "Matrix should be a square matrix !")
        End If

    End Function

#End Region

#Region "Multiply Vectors"
  
    Public Shared Function MultiplyVectors(ByVal Mat1(,) As Double, ByVal Mat2(,) As Double) As Double(,)
        Dim i, j, k As Double
        Dim sol(2, 0) As Double
        Dim Rows1, Cols1 As Integer
        Dim Rows2, Cols2 As Integer

        On Error GoTo Error_Handler

        Find_R_C(Mat1, Rows1, Cols1)
        Find_R_C(Mat2, Rows2, Cols2)

        If Rows1 <> 2 Or Cols1 <> 0 Then
            GoTo Error_Dimension
        End If

        If Rows2 <> 2 Or Cols2 <> 0 Then
            GoTo Error_Dimension
        End If

        i = Mat1(1, 0) * Mat2(2, 0) - Mat1(2, 0) * Mat2(1, 0)
        j = Mat1(2, 0) * Mat2(0, 0) - Mat1(0, 0) * Mat2(2, 0)
        k = Mat1(0, 0) * Mat2(1, 0) - Mat1(1, 0) * Mat2(0, 0)

        sol(0, 0) = i : sol(1, 0) = j : sol(2, 0) = k

        Return sol

Error_Dimension:
        Err.Raise("5016", , "Dimension should be (2 x 0) for both matrices in order to do cross multiplication !")

Error_Handler:

        If Err.Number = 5016 Then
            Err.Raise("5016", , "Dimension should be (2 x 0) for both matrices in order to do cross multiplication !")
        Else
            Err.Raise("5022", , "One or both of the matrices are null, this operation cannot be done !!")
        End If

    End Function

#End Region

#Region "Magnitude of a Vector"

  
    Public Shared Function VectorMagnitude(ByVal Mat(,) As Double) As Double

        Dim Rows, Cols As Integer

        On Error GoTo Error_Handler

        Find_R_C(Mat, Rows, Cols)

        If Rows <> 2 Or Cols <> 0 Then
            GoTo Error_Dimension
        End If

        Return Sqrt(Mat(0, 0) * Mat(0, 0) + Mat(1, 0) * Mat(1, 0) + Mat(2, 0) * Mat(2, 0))

Error_Dimension:
        Err.Raise("5018", , "Dimension of the matrix should be (2 x 0) in order to find the vector's norm !")

Error_Handler:
        If Err.Number = 5018 Then
            Err.Raise("5018", , "Dimension of the matrix should be (2 x 0) in order to find the vector's magnitude !")
        Else
            Err.Raise("5022", , "In order to do this operation values must be assigned to the matrix !!")
        End If

    End Function
#End Region

#Region "Transpose of a Matrix"
  
    Public Shared Function Transpose(ByVal Mat(,) As Double) As Double(,)
        Dim Tr_Mat(,) As Double
        Dim i, j, Rows, Cols As Integer

        On Error GoTo Error_Handler

        Find_R_C(Mat, Rows, Cols)

        ReDim Tr_Mat(Cols, Rows)

        For i = 0 To Cols
            For j = 0 To Rows
                Tr_Mat(j, i) = Mat(i, j)
            Next j
        Next i

        Return Tr_Mat

Error_Handler:
        Err.Raise("5028", , "In order to do this operation values must be assigned to the matrix !!")

    End Function
#End Region

#Region "Multiply a matrix or a vector with a scalar quantity"

    Public Shared Function ScalarMultiply(ByVal Value As Double, ByVal Mat(,) As Double) As Double(,)
        Dim i, j, Rows, Cols As Integer
        Dim sol(,) As Double

        On Error GoTo Error_Handler

        Find_R_C(Mat, Rows, Cols)
        ReDim sol(Rows, Cols)

        For i = 0 To Rows
            For j = 0 To Cols
                sol(i, j) = Mat(i, j) * Value
            Next j
        Next i

        Return (sol)

Error_Handler:
        Err.Raise("5022", , "Matrix was not assigned")
    End Function

#End Region

#Region "Divide a matrix or a vector with a scalar quantity"
  
    Public Shared Function ScalarDivide(ByVal Value As Double, ByVal Mat(,) As Double) As Double(,)
        Dim i, j, Rows, Cols As Integer
        Dim sol(,) As Double

        On Error GoTo Error_Handler

        Find_R_C(Mat, Rows, Cols)
        ReDim sol(Rows, Cols)

        For i = 0 To Rows
            For j = 0 To Cols
                sol(i, j) = Mat(i, j) / Value
            Next j
        Next i

        Return sol

        Exit Function

Error_Handler:
        Err.Raise("5022", , "Matrix was not assigned")
    End Function

#End Region


#Region "Print Matrix"

   
    Public Shared Function PrintMat(ByVal Mat(,) As Double) As String
        Dim N_Rows As Integer, N_Columns, k As Integer, _
            i As Integer, j As Integer, m As Integer
        Dim StrElem As String, StrLen As Long, _
            Greatest() As Integer, LarString As String
        Dim OptiString As String, sol As String

        Find_R_C(Mat, N_Rows, N_Columns)

        sol = ""
        OptiString = ""

        ReDim Greatest(N_Columns)

        For i = 0 To N_Rows
            For j = 0 To N_Columns
                If i = 0 Then
                    Greatest(j) = 0
                    For m = 0 To N_Rows
                        StrElem = Format$(Mat(m, j), "0.0000")
                        StrLen = Len(StrElem)
                        If Greatest(j) < StrLen Then
                            Greatest(j) = StrLen
                            LarString = StrElem
                        End If
                    Next m
                    If Mid$(LarString, 1, 1) = "-" Then Greatest(j) = Greatest(j) + 1
                End If
                StrElem = Format$(Mat(i, j), "0.0000")
                If Mid$(StrElem, 1, 1) = "-" Then
                    StrLen = Len(StrElem)
                    If Greatest(j) >= StrLen Then
                        For k = 1 To (Greatest(j) - StrLen)
                            OptiString = OptiString & "  "
                        Next k
                        OptiString = OptiString & " "
                    End If
                Else
                    StrLen = Len(StrElem)
                    If Greatest(j) > StrLen Then
                        For k = 1 To (Greatest(j) - StrLen)
                            OptiString = OptiString & "  "
                        Next k
                    End If
                End If
                OptiString = OptiString & "  " & Format$(Mat(i, j), "0.0000")
            Next j
            If i <> N_Rows Then
                sol = sol & OptiString & vbCrLf
                OptiString = ""
            End If
            sol = sol & OptiString
            OptiString = ""
        Next i

        PrintMat = sol

        Exit Function
    End Function
#End Region


End Class


FORM :

Option Strict Off
Option Explicit On
Friend Class mnFrm
    Inherits System.Windows.Forms.Form
#Region "Windows Form Designer generated code "
    Public Sub New()
        MyBase.New()
        If m_vb6FormDefInstance Is Nothing Then
            If m_InitializingDefInstance Then
                m_vb6FormDefInstance = Me
            Else
                Try
                    'For the start-up form, the first instance created is the default instance.
                    If System.Reflection.Assembly.GetExecutingAssembly.EntryPoint.DeclaringType Is Me.GetType Then
                        m_vb6FormDefInstance = Me
                    End If
                Catch
                End Try
            End If
        End If
        'This call is required by the Windows Form Designer.
        InitializeComponent()
    End Sub
    'Form overrides dispose to clean up the component list.
    Protected Overloads Overrides Sub Dispose(ByVal Disposing As Boolean)
        If Disposing Then
            If Not components Is Nothing Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(Disposing)
    End Sub
    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer
    Public ToolTip1 As System.Windows.Forms.ToolTip
    Public WithEvents txtSolution As System.Windows.Forms.TextBox
    Public WithEvents CalButton As System.Windows.Forms.Button
    Public WithEvents txtDisplay As System.Windows.Forms.TextBox
    Public WithEvents Label11 As System.Windows.Forms.Label
    Public WithEvents Label10 As System.Windows.Forms.Label
    Public WithEvents Label9 As System.Windows.Forms.Label
    Public WithEvents Label8 As System.Windows.Forms.Label
    Public WithEvents Label7 As System.Windows.Forms.Label
    Public WithEvents Label6 As System.Windows.Forms.Label
    Public WithEvents Label5 As System.Windows.Forms.Label
    Public WithEvents Label4 As System.Windows.Forms.Label
    Public WithEvents Label3 As System.Windows.Forms.Label
    Public WithEvents Label2 As System.Windows.Forms.Label
    Public WithEvents Label1 As System.Windows.Forms.Label
    Public WithEvents FrmSelect As System.Windows.Forms.GroupBox
    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.
    'Do not modify it using the code editor.
    Public WithEvents Option2 As System.Windows.Forms.RadioButton
    Public WithEvents Option1 As System.Windows.Forms.RadioButton
    Public WithEvents Option3 As System.Windows.Forms.RadioButton
    Public WithEvents Option12 As System.Windows.Forms.RadioButton
    Public WithEvents Option11 As System.Windows.Forms.RadioButton
    Public WithEvents Option10 As System.Windows.Forms.RadioButton
    Public WithEvents Option9 As System.Windows.Forms.RadioButton
    Public WithEvents Option8 As System.Windows.Forms.RadioButton
    Public WithEvents Option7 As System.Windows.Forms.RadioButton
    Public WithEvents Option6 As System.Windows.Forms.RadioButton
    Public WithEvents Option5 As System.Windows.Forms.RadioButton
    Public WithEvents Option4 As System.Windows.Forms.RadioButton
    Public WithEvents Label12 As System.Windows.Forms.Label
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.components = New System.ComponentModel.Container
        Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components)
        Me.txtSolution = New System.Windows.Forms.TextBox
        Me.CalButton = New System.Windows.Forms.Button
        Me.txtDisplay = New System.Windows.Forms.TextBox
        Me.FrmSelect = New System.Windows.Forms.GroupBox
        Me.Label12 = New System.Windows.Forms.Label
        Me.Option3 = New System.Windows.Forms.RadioButton
        Me.Option12 = New System.Windows.Forms.RadioButton
        Me.Option11 = New System.Windows.Forms.RadioButton
        Me.Option10 = New System.Windows.Forms.RadioButton
        Me.Option9 = New System.Windows.Forms.RadioButton
        Me.Option8 = New System.Windows.Forms.RadioButton
        Me.Option7 = New System.Windows.Forms.RadioButton
        Me.Option6 = New System.Windows.Forms.RadioButton
        Me.Option5 = New System.Windows.Forms.RadioButton
        Me.Option4 = New System.Windows.Forms.RadioButton
        Me.Option2 = New System.Windows.Forms.RadioButton
        Me.Option1 = New System.Windows.Forms.RadioButton
        Me.Label11 = New System.Windows.Forms.Label
        Me.Label10 = New System.Windows.Forms.Label
        Me.Label9 = New System.Windows.Forms.Label
        Me.Label8 = New System.Windows.Forms.Label
        Me.Label7 = New System.Windows.Forms.Label
        Me.Label6 = New System.Windows.Forms.Label
        Me.Label5 = New System.Windows.Forms.Label
        Me.Label4 = New System.Windows.Forms.Label
        Me.Label3 = New System.Windows.Forms.Label
        Me.Label2 = New System.Windows.Forms.Label
        Me.Label1 = New System.Windows.Forms.Label
        Me.FrmSelect.SuspendLayout()
        Me.SuspendLayout()
        '
        'txtSolution
        '
        Me.txtSolution.AcceptsReturn = True
        Me.txtSolution.BackColor = System.Drawing.SystemColors.Window
        Me.txtSolution.Cursor = System.Windows.Forms.Cursors.IBeam
        Me.txtSolution.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.txtSolution.ForeColor = System.Drawing.SystemColors.WindowText
        Me.txtSolution.Location = New System.Drawing.Point(8, 336)
        Me.txtSolution.MaxLength = 0
        Me.txtSolution.Multiline = True
        Me.txtSolution.Name = "txtSolution"
        Me.txtSolution.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.txtSolution.ScrollBars = System.Windows.Forms.ScrollBars.Both
        Me.txtSolution.Size = New System.Drawing.Size(393, 120)
        Me.txtSolution.TabIndex = 8
        Me.txtSolution.WordWrap = False
        '
        'CalButton
        '
        Me.CalButton.BackColor = System.Drawing.SystemColors.Control
        Me.CalButton.Cursor = System.Windows.Forms.Cursors.Default
        Me.CalButton.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.CalButton.ForeColor = System.Drawing.SystemColors.ControlText
        Me.CalButton.Location = New System.Drawing.Point(416, 360)
        Me.CalButton.Name = "CalButton"
        Me.CalButton.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.CalButton.Size = New System.Drawing.Size(89, 73)
        Me.CalButton.TabIndex = 1
        Me.CalButton.Text = "Hitung"
        Me.CalButton.UseVisualStyleBackColor = False
        '
        'txtDisplay
        '
        Me.txtDisplay.AcceptsReturn = True
        Me.txtDisplay.BackColor = System.Drawing.SystemColors.Window
        Me.txtDisplay.Cursor = System.Windows.Forms.Cursors.IBeam
        Me.txtDisplay.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.txtDisplay.ForeColor = System.Drawing.SystemColors.WindowText
        Me.txtDisplay.Location = New System.Drawing.Point(8, 8)
        Me.txtDisplay.MaxLength = 0
        Me.txtDisplay.Multiline = True
        Me.txtDisplay.Name = "txtDisplay"
        Me.txtDisplay.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.txtDisplay.ScrollBars = System.Windows.Forms.ScrollBars.Both
        Me.txtDisplay.Size = New System.Drawing.Size(393, 328)
        Me.txtDisplay.TabIndex = 10
        Me.txtDisplay.WordWrap = False
        '
        'FrmSelect
        '
        Me.FrmSelect.BackColor = System.Drawing.SystemColors.Control
        Me.FrmSelect.Controls.Add(Me.Label12)
        Me.FrmSelect.Controls.Add(Me.Option3)
        Me.FrmSelect.Controls.Add(Me.Option12)
        Me.FrmSelect.Controls.Add(Me.Option11)
        Me.FrmSelect.Controls.Add(Me.Option10)
        Me.FrmSelect.Controls.Add(Me.Option9)
        Me.FrmSelect.Controls.Add(Me.Option8)
        Me.FrmSelect.Controls.Add(Me.Option7)
        Me.FrmSelect.Controls.Add(Me.Option6)
        Me.FrmSelect.Controls.Add(Me.Option5)
        Me.FrmSelect.Controls.Add(Me.Option4)
        Me.FrmSelect.Controls.Add(Me.Option2)
        Me.FrmSelect.Controls.Add(Me.Option1)
        Me.FrmSelect.Controls.Add(Me.Label11)
        Me.FrmSelect.Controls.Add(Me.Label10)
        Me.FrmSelect.Controls.Add(Me.Label9)
        Me.FrmSelect.Controls.Add(Me.Label8)
        Me.FrmSelect.Controls.Add(Me.Label7)
        Me.FrmSelect.Controls.Add(Me.Label6)
        Me.FrmSelect.Controls.Add(Me.Label5)
        Me.FrmSelect.Controls.Add(Me.Label4)
        Me.FrmSelect.Controls.Add(Me.Label3)
        Me.FrmSelect.Controls.Add(Me.Label2)
        Me.FrmSelect.Controls.Add(Me.Label1)
        Me.FrmSelect.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.FrmSelect.ForeColor = System.Drawing.SystemColors.ControlText
        Me.FrmSelect.Location = New System.Drawing.Point(408, 0)
        Me.FrmSelect.Name = "FrmSelect"
        Me.FrmSelect.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.FrmSelect.Size = New System.Drawing.Size(105, 456)
        Me.FrmSelect.TabIndex = 1
        Me.FrmSelect.TabStop = False
        '
        'Label12
        '
        Me.Label12.BackColor = System.Drawing.SystemColors.Control
        Me.Label12.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label12.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label12.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label12.Location = New System.Drawing.Point(24, 80)
        Me.Label12.Name = "Label12"
        Me.Label12.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label12.Size = New System.Drawing.Size(56, 25)
        Me.Label12.TabIndex = 37
        Me.Label12.Text = " A x B"
        '
        'Option3
        '
        Me.Option3.BackColor = System.Drawing.SystemColors.Control
        Me.Option3.Cursor = System.Windows.Forms.Cursors.Default
        Me.Option3.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Option3.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Option3.Location = New System.Drawing.Point(8, 80)
        Me.Option3.Name = "Option3"
        Me.Option3.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Option3.Size = New System.Drawing.Size(17, 17)
        Me.Option3.TabIndex = 36
        Me.Option3.Text = "Option1"
        Me.Option3.UseVisualStyleBackColor = False
        '
        'Option12
        '
        Me.Option12.BackColor = System.Drawing.SystemColors.Control
        Me.Option12.Cursor = System.Windows.Forms.Cursors.Default
        Me.Option12.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Option12.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Option12.Location = New System.Drawing.Point(8, 296)
        Me.Option12.Name = "Option12"
        Me.Option12.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Option12.Size = New System.Drawing.Size(17, 17)
        Me.Option12.TabIndex = 35
        Me.Option12.Text = "Option1"
        Me.Option12.UseVisualStyleBackColor = False
        '
        'Option11
        '
        Me.Option11.BackColor = System.Drawing.SystemColors.Control
        Me.Option11.Cursor = System.Windows.Forms.Cursors.Default
        Me.Option11.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Option11.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Option11.Location = New System.Drawing.Point(8, 272)
        Me.Option11.Name = "Option11"
        Me.Option11.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Option11.Size = New System.Drawing.Size(17, 17)
        Me.Option11.TabIndex = 34
        Me.Option11.Text = "Option1"
        Me.Option11.UseVisualStyleBackColor = False
        '
        'Option10
        '
        Me.Option10.BackColor = System.Drawing.SystemColors.Control
        Me.Option10.Cursor = System.Windows.Forms.Cursors.Default
        Me.Option10.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Option10.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Option10.Location = New System.Drawing.Point(8, 248)
        Me.Option10.Name = "Option10"
        Me.Option10.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Option10.Size = New System.Drawing.Size(17, 17)
        Me.Option10.TabIndex = 33
        Me.Option10.Text = "Option1"
        Me.Option10.UseVisualStyleBackColor = False
        '
        'Option9
        '
        Me.Option9.BackColor = System.Drawing.SystemColors.Control
        Me.Option9.Cursor = System.Windows.Forms.Cursors.Default
        Me.Option9.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Option9.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Option9.Location = New System.Drawing.Point(8, 224)
        Me.Option9.Name = "Option9"
        Me.Option9.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Option9.Size = New System.Drawing.Size(17, 17)
        Me.Option9.TabIndex = 32
        Me.Option9.Text = "Option1"
        Me.Option9.UseVisualStyleBackColor = False
        '
        'Option8
        '
        Me.Option8.BackColor = System.Drawing.SystemColors.Control
        Me.Option8.Cursor = System.Windows.Forms.Cursors.Default
        Me.Option8.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Option8.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Option8.Location = New System.Drawing.Point(8, 200)
        Me.Option8.Name = "Option8"
        Me.Option8.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Option8.Size = New System.Drawing.Size(17, 17)
        Me.Option8.TabIndex = 31
        Me.Option8.Text = "Option1"
        Me.Option8.UseVisualStyleBackColor = False
        '
        'Option7
        '
        Me.Option7.BackColor = System.Drawing.SystemColors.Control
        Me.Option7.Cursor = System.Windows.Forms.Cursors.Default
        Me.Option7.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Option7.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Option7.Location = New System.Drawing.Point(8, 176)
        Me.Option7.Name = "Option7"
        Me.Option7.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Option7.Size = New System.Drawing.Size(17, 17)
        Me.Option7.TabIndex = 30
        Me.Option7.Text = "Option1"
        Me.Option7.UseVisualStyleBackColor = False
        '
        'Option6
        '
        Me.Option6.BackColor = System.Drawing.SystemColors.Control
        Me.Option6.Cursor = System.Windows.Forms.Cursors.Default
        Me.Option6.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Option6.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Option6.Location = New System.Drawing.Point(8, 152)
        Me.Option6.Name = "Option6"
        Me.Option6.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Option6.Size = New System.Drawing.Size(17, 17)
        Me.Option6.TabIndex = 29
        Me.Option6.Text = "Option1"
        Me.Option6.UseVisualStyleBackColor = False
        '
        'Option5
        '
        Me.Option5.BackColor = System.Drawing.SystemColors.Control
        Me.Option5.Cursor = System.Windows.Forms.Cursors.Default
        Me.Option5.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Option5.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Option5.Location = New System.Drawing.Point(8, 128)
        Me.Option5.Name = "Option5"
        Me.Option5.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Option5.Size = New System.Drawing.Size(17, 17)
        Me.Option5.TabIndex = 28
        Me.Option5.Text = "Option1"
        Me.Option5.UseVisualStyleBackColor = False
        '
        'Option4
        '
        Me.Option4.BackColor = System.Drawing.SystemColors.Control
        Me.Option4.Cursor = System.Windows.Forms.Cursors.Default
        Me.Option4.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Option4.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Option4.Location = New System.Drawing.Point(8, 104)
        Me.Option4.Name = "Option4"
        Me.Option4.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Option4.Size = New System.Drawing.Size(17, 17)
        Me.Option4.TabIndex = 27
        Me.Option4.Text = "Option1"
        Me.Option4.UseVisualStyleBackColor = False
        '
        'Option2
        '
        Me.Option2.BackColor = System.Drawing.SystemColors.Control
        Me.Option2.Cursor = System.Windows.Forms.Cursors.Default
        Me.Option2.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Option2.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Option2.Location = New System.Drawing.Point(8, 56)
        Me.Option2.Name = "Option2"
        Me.Option2.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Option2.Size = New System.Drawing.Size(17, 17)
        Me.Option2.TabIndex = 26
        Me.Option2.Text = "Option1"
        Me.Option2.UseVisualStyleBackColor = False
        '
        'Option1
        '
        Me.Option1.BackColor = System.Drawing.SystemColors.Control
        Me.Option1.Checked = True
        Me.Option1.Cursor = System.Windows.Forms.Cursors.Default
        Me.Option1.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Option1.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Option1.Location = New System.Drawing.Point(8, 32)
        Me.Option1.Name = "Option1"
        Me.Option1.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Option1.Size = New System.Drawing.Size(17, 17)
        Me.Option1.TabIndex = 25
        Me.Option1.TabStop = True
        Me.Option1.Text = "Option1"
        Me.Option1.UseVisualStyleBackColor = False
        '
        'Label11
        '
        Me.Label11.BackColor = System.Drawing.SystemColors.Control
        Me.Label11.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label11.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label11.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label11.Location = New System.Drawing.Point(24, 104)
        Me.Label11.Name = "Label11"
        Me.Label11.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label11.Size = New System.Drawing.Size(56, 25)
        Me.Label11.TabIndex = 24
        Me.Label11.Text = " Det (A)"
        '
        'Label10
        '
        Me.Label10.BackColor = System.Drawing.SystemColors.Control
        Me.Label10.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label10.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label10.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label10.Location = New System.Drawing.Point(24, 296)
        Me.Label10.Name = "Label10"
        Me.Label10.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label10.Size = New System.Drawing.Size(57, 25)
        Me.Label10.TabIndex = 23
        Me.Label10.Text = " A x Tr (B) + Inv(A)"
        '
        'Label9
        '
        Me.Label9.BackColor = System.Drawing.SystemColors.Control
        Me.Label9.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label9.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label9.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label9.Location = New System.Drawing.Point(24, 272)
        Me.Label9.Name = "Label9"
        Me.Label9.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label9.Size = New System.Drawing.Size(64, 25)
        Me.Label9.TabIndex = 22
        Me.Label9.Text = " B x Inv (B)"
        '
        'Label8
        '
        Me.Label8.BackColor = System.Drawing.SystemColors.Control
        Me.Label8.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label8.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label8.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label8.Location = New System.Drawing.Point(24, 248)
        Me.Label8.Name = "Label8"
        Me.Label8.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label8.Size = New System.Drawing.Size(57, 25)
        Me.Label8.TabIndex = 21
        Me.Label8.Text = " V2 / 3 "
        '
        'Label7
        '
        Me.Label7.BackColor = System.Drawing.SystemColors.Control
        Me.Label7.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label7.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label7.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label7.Location = New System.Drawing.Point(24, 224)
        Me.Label7.Name = "Label7"
        Me.Label7.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label7.Size = New System.Drawing.Size(57, 25)
        Me.Label7.TabIndex = 20
        Me.Label7.Text = " 5 A"
        '
        'Label6
        '
        Me.Label6.BackColor = System.Drawing.SystemColors.Control
        Me.Label6.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label6.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label6.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label6.Location = New System.Drawing.Point(24, 200)
        Me.Label6.Name = "Label6"
        Me.Label6.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label6.Size = New System.Drawing.Size(57, 25)
        Me.Label6.TabIndex = 19
        Me.Label6.Text = " | V1 |"
        '
        'Label5
        '
        Me.Label5.BackColor = System.Drawing.SystemColors.Control
        Me.Label5.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label5.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label5.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label5.Location = New System.Drawing.Point(24, 176)
        Me.Label5.Name = "Label5"
        Me.Label5.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label5.Size = New System.Drawing.Size(57, 25)
        Me.Label5.TabIndex = 18
        Me.Label5.Text = " V1 x V2"
        '
        'Label4
        '
        Me.Label4.BackColor = System.Drawing.SystemColors.Control
        Me.Label4.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label4.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label4.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label4.Location = New System.Drawing.Point(24, 152)
        Me.Label4.Name = "Label4"
        Me.Label4.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label4.Size = New System.Drawing.Size(72, 25)
        Me.Label4.TabIndex = 17
        Me.Label4.Text = "Transpose(B)"
        '
        'Label3
        '
        Me.Label3.BackColor = System.Drawing.SystemColors.Control
        Me.Label3.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label3.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label3.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label3.Location = New System.Drawing.Point(24, 128)
        Me.Label3.Name = "Label3"
        Me.Label3.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label3.Size = New System.Drawing.Size(57, 25)
        Me.Label3.TabIndex = 16
        Me.Label3.Text = "Inverse(A)"
        '
        'Label2
        '
        Me.Label2.BackColor = System.Drawing.SystemColors.Control
        Me.Label2.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label2.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label2.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label2.Location = New System.Drawing.Point(24, 56)
        Me.Label2.Name = "Label2"
        Me.Label2.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label2.Size = New System.Drawing.Size(33, 25)
        Me.Label2.TabIndex = 15
        Me.Label2.Text = " A - B"
        '
        'Label1
        '
        Me.Label1.BackColor = System.Drawing.SystemColors.Control
        Me.Label1.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label1.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label1.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label1.Location = New System.Drawing.Point(24, 32)
        Me.Label1.Name = "Label1"
        Me.Label1.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label1.Size = New System.Drawing.Size(40, 25)
        Me.Label1.TabIndex = 14
        Me.Label1.Text = " A + B"
        '
        'mnFrm
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
        Me.ClientSize = New System.Drawing.Size(520, 456)
        Me.Controls.Add(Me.txtSolution)
        Me.Controls.Add(Me.CalButton)
        Me.Controls.Add(Me.txtDisplay)
        Me.Controls.Add(Me.FrmSelect)
        Me.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Location = New System.Drawing.Point(4, 25)
        Me.Name = "mnFrm"
        Me.FrmSelect.ResumeLayout(False)
        Me.ResumeLayout(False)
        Me.PerformLayout()

    End Sub
#End Region
#Region "Upgrade Support "
    Private Shared m_vb6FormDefInstance As mnFrm
    Private Shared m_InitializingDefInstance As Boolean
    Public Shared Property DefInstance() As mnFrm
        Get
            If m_vb6FormDefInstance Is Nothing OrElse m_vb6FormDefInstance.IsDisposed Then
                m_InitializingDefInstance = True
                m_vb6FormDefInstance = New mnFrm()
                m_InitializingDefInstance = False
            End If
            DefInstance = m_vb6FormDefInstance
        End Get
        Set
            m_vb6FormDefInstance = Value
        End Set
    End Property
#End Region
   
   
    Dim A(3, 3) As Double 'defines a matrix A with dimensions (4x4)
    Dim B(3, 3) As Double 'defines a matrix B with dimensions (4x4)
   
    Dim V1(2, 0) As Double 'define a vector V1
    Dim V2(2, 0) As Double 'define a vector V2
   
    Private Sub CalButton_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles CalButton.Click
        'Assign a dynamic matrix C
        Dim C(,) As Double
       
        Dim Determinant As Double
        Dim Magnitude As Double


        If Option1.Checked = True Then
            'Addition Case
            C = MatLib.Add(A, B) 'C = Addition of A and B

            txtSolution.Text = "Answer A + B = " & vbCrLf & vbCrLf
            txtSolution.Text = txtSolution.Text & MatLib.PrintMat(C) 'Print C

        ElseIf Option2.Checked = True Then
            'Subtraction Case

            C = MatLib.Subtract(A, B) 'C = Subtration of A from B
            'Print C
            txtSolution.Text = "Answer A - B = " & vbCrLf & vbCrLf
            txtSolution.Text = txtSolution.Text & MatLib.PrintMat(C) 'Print C

        ElseIf Option3.Checked = True Then
            'Multiplication Case

            C = MatLib.Multiply(A, B) 'C = Multiple of A and B
            'Print C
            txtSolution.Text = "Answer A x B = " & vbCrLf & vbCrLf
            txtSolution.Text = txtSolution.Text & MatLib.PrintMat(C) 'Print C

        ElseIf Option4.Checked = True Then
            'Determinant Case of Matrix A
            Determinant = MatLib.Det(A)

            txtSolution.Text = "Answer Determinant of A = " & vbCrLf & vbCrLf
            txtSolution.Text = txtSolution.Text & Determinant

        ElseIf Option5.Checked = True Then
            'Inverse Case of Matrix B
            C = MatLib.Inv(A)

            txtSolution.Text = "Answer Inverse of A = " & vbCrLf & vbCrLf
            txtSolution.Text = txtSolution.Text & MatLib.PrintMat(C)

        ElseIf Option6.Checked = True Then
            'Transpose Case of Matrix B
            C = MatLib.Transpose(B)

            txtSolution.Text = "Answer Transpose of B = " & vbCrLf & vbCrLf
            txtSolution.Text = txtSolution.Text & MatLib.PrintMat(C)

        ElseIf Option7.Checked = True Then
            'Mutiply Vectors V1 and V2 Case
            C = MatLib.MultiplyVectors(V1, V2)

            txtSolution.Text = "Answer V1 x V2 = " & vbCrLf & vbCrLf
            txtSolution.Text = txtSolution.Text & MatLib.PrintMat(C)

        ElseIf Option8.Checked = True Then
            'Magnitude of Vector V1 Case
            Magnitude = MatLib.VectorMagnitude(V1)

            txtSolution.Text = "Answer |V1| = " & vbCrLf & vbCrLf
            txtSolution.Text = txtSolution.Text & Magnitude

        ElseIf Option9.Checked = True Then
            'Scalar Multiply 5*A Case
            C = MatLib.ScalarMultiply(5, A)
            txtSolution.Text = "Answer 5A = " & vbCrLf & vbCrLf
            txtSolution.Text = txtSolution.Text & MatLib.PrintMat(C)

        ElseIf Option10.Checked = True Then
            'Scalar Divide V2/3 Case
            C = MatLib.ScalarDivide(3, V2)
            txtSolution.Text = "Answer V2 / 3 = " & vbCrLf & vbCrLf
            txtSolution.Text = txtSolution.Text & MatLib.PrintMat(C)

        ElseIf Option11.Checked = True Then
            'Case Bxinv(B)
            C = MatLib.Multiply(A, MatLib.Inv(A))
            txtSolution.Text = "Answer B x Inverse(B) = " & vbCrLf & vbCrLf
            txtSolution.Text = txtSolution.Text & MatLib.PrintMat(C)

        ElseIf Option12.Checked = True Then
            'Case AxTranspose(B)+inv(A)
            C = MatLib.Add(MatLib.Multiply(A, MatLib.Transpose(B)), MatLib.Inv(A))
            txtSolution.Text = "Answer A x Transpose(B)+Inverse(A) = " & vbCrLf & vbCrLf
            txtSolution.Text = txtSolution.Text & MatLib.PrintMat(C)
        End If

    End Sub


    Private Sub mnFrm_Load(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles MyBase.Load
        Dim i, j As Short

        'Assign some values to matrix A and B
        A(0, 0) = 1 : A(0, 1) = 2 : A(0, 2) = 3 : A(0, 3) = 4
        A(1, 0) = 5 : A(1, 1) = 6 : A(1, 2) = 7 : A(1, 3) = 8
        A(2, 0) = 9 : A(2, 1) = 10 : A(2, 2) = 1 : A(2, 3) = 12
        A(3, 0) = 13 : A(3, 1) = -14 : A(3, 2) = 15 : A(3, 3) = 16

        For i = 0 To 3
            For j = 0 To 3
                B(i, j) = 2 * Rnd(1)
            Next j
        Next i

        'Assign some values to vectors V1 and V2
        V1(0, 0) = 1 : V1(1, 0) = 2 : V1(2, 0) = 3
        V2(0, 0) = 4 : V2(1, 0) = 5 : V2(2, 0) = 6

        'Print Matrices And Vectors
        txtDisplay.Text = "Matix A = " & vbCrLf
        txtDisplay.Text = txtDisplay.Text & MatLib.PrintMat(A) & vbCrLf & vbCrLf

        txtDisplay.Text = txtDisplay.Text & "Matix B = " & vbCrLf
        txtDisplay.Text = txtDisplay.Text & MatLib.PrintMat(B) & vbCrLf & vbCrLf

        txtDisplay.Text = txtDisplay.Text & "Vector V1 = " & vbCrLf
        txtDisplay.Text = txtDisplay.Text & MatLib.PrintMat(V1) & vbCrLf & vbCrLf

        txtDisplay.Text = txtDisplay.Text & "Vector V2 = " & vbCrLf
        txtDisplay.Text = txtDisplay.Text & MatLib.PrintMat(V2)
    End Sub

    Private Sub FrmSelect_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FrmSelect.Enter

    End Sub
End Class