FrameWork 2
Hi.
Can anyone say how I prevent the error: "'Function' is not a member of
'System.Windows .Forms.Form'".
I have a form where I have many public functions created for me. The user
will can open 'x' forms(the same form.) and I'm accessing this forms with
the new function "OpenForms" .
I named the forms: "MyForm_" & i.tostring.
But when I try put my function is returned the error.
The code:
' Here I open the forms.
Dim i As Integer = 0
Dim _frmMensagens(2 ) As FrmMensagens
For i = 0 To 2
_frmMensagens(i ) = New FrmMensagens
QtdeFormsMsgs += 1
With _frmMensagens(i )
.FormDono = Me
.Name = "TelaMensag em_" & i.ToString
.Posicao = i
.Show()
End With
Next
'Here I try to access my function in form, but is returned de error.
Dim i As Integer = 0
For i = 0 To QtdeFormsMsgs
With Application.Ope nForms("TelaMen sagem_" & i.ToString)
.MyFunction(Me. Left - PosicaoInicialL eft, Me.Top -
PosicaoInicialT op)
End With
Next
[]'s
Luis Gustavo
Sorry for my English
Hi.
Can anyone say how I prevent the error: "'Function' is not a member of
'System.Windows .Forms.Form'".
I have a form where I have many public functions created for me. The user
will can open 'x' forms(the same form.) and I'm accessing this forms with
the new function "OpenForms" .
I named the forms: "MyForm_" & i.tostring.
But when I try put my function is returned the error.
The code:
' Here I open the forms.
Dim i As Integer = 0
Dim _frmMensagens(2 ) As FrmMensagens
For i = 0 To 2
_frmMensagens(i ) = New FrmMensagens
QtdeFormsMsgs += 1
With _frmMensagens(i )
.FormDono = Me
.Name = "TelaMensag em_" & i.ToString
.Posicao = i
.Show()
End With
Next
'Here I try to access my function in form, but is returned de error.
Dim i As Integer = 0
For i = 0 To QtdeFormsMsgs
With Application.Ope nForms("TelaMen sagem_" & i.ToString)
.MyFunction(Me. Left - PosicaoInicialL eft, Me.Top -
PosicaoInicialT op)
End With
Next
[]'s
Luis Gustavo
Sorry for my English
Comment