home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 4_2005-2006.ISO / data / Zips / The_Matrix199261572006.psc / forms / dlgScal.frm < prev    next >
Text File  |  2006-05-05  |  3KB  |  116 lines

  1. VERSION 5.00
  2. Object = "{0D452EE1-E08F-101A-852E-02608C4D0BB4}#2.0#0"; "FM20.DLL"
  3. Begin VB.Form dlgScal 
  4.    BackColor       =   &H00000000&
  5.    BorderStyle     =   3  'Fixed Dialog
  6.    Caption         =   "Scalar Multiplication"
  7.    ClientHeight    =   1410
  8.    ClientLeft      =   5670
  9.    ClientTop       =   3780
  10.    ClientWidth     =   2310
  11.    LinkTopic       =   "Form1"
  12.    LockControls    =   -1  'True
  13.    MaxButton       =   0   'False
  14.    MinButton       =   0   'False
  15.    ScaleHeight     =   1410
  16.    ScaleWidth      =   2310
  17.    ShowInTaskbar   =   0   'False
  18.    Begin VB.TextBox txtConst 
  19.       Alignment       =   2  'Center
  20.       Appearance      =   0  'Flat
  21.       BackColor       =   &H00404040&
  22.       BorderStyle     =   0  'None
  23.       BeginProperty Font 
  24.          Name            =   "Verdana"
  25.          Size            =   12
  26.          Charset         =   0
  27.          Weight          =   700
  28.          Underline       =   0   'False
  29.          Italic          =   0   'False
  30.          Strikethrough   =   0   'False
  31.       EndProperty
  32.       ForeColor       =   &H00FFFFFF&
  33.       Height          =   390
  34.       Left            =   308
  35.       TabIndex        =   0
  36.       ToolTipText     =   "Enter a valid maximum matrix dimension here."
  37.       Top             =   480
  38.       Width           =   1695
  39.    End
  40.    Begin MSForms.CommandButton CancelButton 
  41.       Cancel          =   -1  'True
  42.       Height          =   375
  43.       Left            =   1215
  44.       TabIndex        =   3
  45.       Top             =   960
  46.       Width           =   975
  47.       ForeColor       =   14737632
  48.       VariousPropertyBits=   19
  49.       Caption         =   "Cancel"
  50.       Size            =   "1720;661"
  51.       TakeFocusOnClick=   0   'False
  52.       FontHeight      =   165
  53.       FontCharSet     =   0
  54.       FontPitchAndFamily=   2
  55.       ParagraphAlign  =   3
  56.    End
  57.    Begin MSForms.CommandButton OKButton 
  58.       Default         =   -1  'True
  59.       Height          =   375
  60.       Left            =   120
  61.       TabIndex        =   2
  62.       Top             =   960
  63.       Width           =   975
  64.       ForeColor       =   14737632
  65.       VariousPropertyBits=   19
  66.       Caption         =   "OK"
  67.       Size            =   "1720;661"
  68.       TakeFocusOnClick=   0   'False
  69.       FontHeight      =   165
  70.       FontCharSet     =   0
  71.       FontPitchAndFamily=   2
  72.       ParagraphAlign  =   3
  73.    End
  74.    Begin VB.Label Label1 
  75.       AutoSize        =   -1  'True
  76.       BackStyle       =   0  'Transparent
  77.       Caption         =   "Constant value:"
  78.       ForeColor       =   &H00C0C0C0&
  79.       Height          =   195
  80.       Left            =   120
  81.       TabIndex        =   1
  82.       Top             =   240
  83.       Width           =   1110
  84.    End
  85. End
  86. Attribute VB_Name = "dlgScal"
  87. Attribute VB_GlobalNameSpace = False
  88. Attribute VB_Creatable = False
  89. Attribute VB_PredeclaredId = True
  90. Attribute VB_Exposed = False
  91. Dim where As Integer
  92. Option Explicit
  93. Public Sub showThis(ByVal ind As Integer)
  94.     where = ind
  95.     Me.Show
  96. End Sub
  97.  
  98. Private Sub CancelButton_Click()
  99.     Unload Me
  100.     
  101. End Sub
  102.  
  103. Private Sub Form_Load()
  104.     txtConst.Text = 0
  105.     
  106. End Sub
  107.  
  108. Private Sub OKButton_Click()
  109.     Dim scalarProd As New Matrix
  110.     Set scalarProd = scalarMultiplication(mymatrix(where), txtConst.Text)
  111.     frmMain.txtResult.Text = scalarProd.toString
  112.     
  113.     Unload Me
  114.     
  115. End Sub
  116.