D
Dean Slindee
I have a form whose Property value I need to get at from a class (contained
in another project, same solution).
Here is the form's property:
Private booIsInsert As Boolean = False
Public Property IsInsert() As Boolean
Get
Return booIsInsert
End Get
Set(ByVal Value As Boolean)
booIsInsert = Value
End Set
End Property
Here is the class's function that needs the property value:
Public Shared Sub FormDataChanged(ByVal sender As System.Object)
Dim frmParent As Form
frmParent = sender.ParentForm
If Not frmParent.IsInsert Then 'SYNTAX ERROR line
Dim ctl As Control
ctl = CType(frmParent.Controls.Item("btnUpdate"), Control)
Call FrameButtonPaintFlat(frmParent, CType(ctl, Control)) 'green
frame around button
End If
Syntax error message: "IsInsert is not a member of
System.Windows.Forms.Form"
I understand the error, but is there *any* way to reference the frmParent
instance and get the IsInsert property value?
Or some other approach?
Thanks in advance.
Dean S
in another project, same solution).
Here is the form's property:
Private booIsInsert As Boolean = False
Public Property IsInsert() As Boolean
Get
Return booIsInsert
End Get
Set(ByVal Value As Boolean)
booIsInsert = Value
End Set
End Property
Here is the class's function that needs the property value:
Public Shared Sub FormDataChanged(ByVal sender As System.Object)
Dim frmParent As Form
frmParent = sender.ParentForm
If Not frmParent.IsInsert Then 'SYNTAX ERROR line
Dim ctl As Control
ctl = CType(frmParent.Controls.Item("btnUpdate"), Control)
Call FrameButtonPaintFlat(frmParent, CType(ctl, Control)) 'green
frame around button
End If
Syntax error message: "IsInsert is not a member of
System.Windows.Forms.Form"
I understand the error, but is there *any* way to reference the frmParent
instance and get the IsInsert property value?
Or some other approach?
Thanks in advance.
Dean S