Form2: 'Captura El Numero de Filas Del Datagridview
Form2: 'Captura El Numero de Filas Del Datagridview
Dim O As Integer = -1
Dim Mt As Integer
Dim Nt As Integer
Dim pi As Double = 3.1415926535897931
Dim C As Integer
Dim Xx() As Double
Dim Yy() As Double
Dim M() As Double
Dim i() As Double
Dim j() As Double
Dim Ee() As Double
Dim Aa() As Double
Dim Ii() As Double
End Sub
End Sub
ReDim Xx(Nt)
ReDim Yy(Nt)
For jm = 1 To Nt
Xx(jm) = dataGridView1.Rows(jm - 1).Cells(0).Value
Yy(jm) = dataGridView1.Rows(jm - 1).Cells(1).Value
Next
ElseIf (C = 1) Then
Dim im, jm As Integer
Mt = 0
For im = 0 To O
If (dataGridView1.Rows(im).Cells(0).Value <> "") Then
Mt = Mt + 1
End If
Next
ReDim M(Mt)
ReDim i(Mt)
ReDim j(Mt)
For jm = 1 To Mt
If (dataGridView1.Rows(jm - 1).Cells(0).Value < dataGridView1.Rows(jm -
1).Cells(1).Value) Then
i(jm) = dataGridView1.Rows(jm - 1).Cells(0).Value
j(jm) = dataGridView1.Rows(jm - 1).Cells(1).Value
Else
i(jm) = dataGridView1.Rows(jm - 1).Cells(1).Value
j(jm) = dataGridView1.Rows(jm - 1).Cells(0).Value
End If
Next
ElseIf (C = 2) Then
Dim im As Integer
ReDim Ee(Mt)
For im = 1 To Mt
Ee(im) = dataGridView1.Rows(im - 1).Cells(0).Value
Next
ElseIf (C = 3) Then
Dim im As Integer
ReDim Ii(Mt)
ReDim Aa(Mt)
For im = 1 To Mt
Dim D As Double
D = dataGridView1.Rows(im - 1).Cells(0).Value
Aa(im) = D ^ 2 * pi / 4
Ii(im) = D ^ 4 * pi / 64
Next
ElseIf (C = 4) Then
Dim im As Integer
ReDim Ii(Mt)
ReDim Aa(Mt)
For im = 1 To Mt
Dim Base, Altura As Double
Base = dataGridView1.Rows(im - 1).Cells(0).Value
Altura = dataGridView1.Rows(im - 1).Cells(1).Value
Aa(im) = Base * Altura
Ii(im) = Base * Altura ^ 3 / 12
Next
End If
End Sub
'VERIFICACION'
MsgBox("ANG(" & (im) & ")" & ang)
R(0, 0) = Math.Cos(ang)
R(0, 1) = -Math.Sin(ang)
R(1, 0) = Math.Sin(ang)
R(1, 1) = Math.Cos(ang)
R(2, 2) = 1
R(3, 3) = Math.Cos(ang)
R(3, 4) = -Math.Sin(ang)
R(4, 3) = Math.Sin(ang)
R(4, 4) = Math.Cos(ang)
R(5, 5) = 1
Rt(0, 0) = Math.Cos(ang)
Rt(0, 1) = -Math.Sin(ang)
Rt(1, 0) = Math.Sin(ang)
Rt(1, 1) = Math.Cos(ang)
Rt(2, 2) = 1
Rt(3, 3) = Math.Cos(ang)
Rt(3, 4) = -Math.Sin(ang)
Rt(4, 3) = Math.Sin(ang)
Rt(4, 4) = Math.Cos(ang)
Rt(5, 5) = 1
'Matriz transpuesta de rotacion del elemento'
Dim irot, jrot As Integer
Dim Crot As Integer = 0
Dim Drot As Double
For irot = 0 To 5
For jrot = Crot To 5
Drot = Rt(irot, jrot)
Rt(irot, jrot) = Rt(jrot, irot)
Rt(jrot, irot) = Drot
Next
Crot = Crot + 1
Next
Next
ckd = ckd + 6
Next
'VERIFICACIO'
'CORRECTO APROBADO'
Next
End Sub
End Sub
End Sub
Dim R As Integer = 0
For R = 1 To Nt
With Restricciones
.Rows.Add()
End With
Next
End Sub
Dim R As Integer = 0
For R = 1 To Nt
With Cargas
.Rows.Add()
End With
Next
End Sub
CellValueChanged