Good afternoon all,
I am having a little problem using the SuspendLayout & ResumeLayout
functions from a module.
This is the Delegate Declaration in the module:
Public Delegate Sub Delegate_Layout()
Public Delegate_Form_Layout() As Delegate_Layout = _
{ _
AddressOf Form_SuspendLayout, _
AddressOf Form_ResumeLayout _
}
This is the code from the main form:
Public Sub Form_SuspendLayout()
Me.SuspendLayout()
End Sub
Public Sub Form_ResumeLayout()
Me.ResumeLayout()
End Sub
Unfortunately the AddressOf Form_SuspendLayout and AddressOf
Form_ResumeLayout return errors saying that they are not declared.
I tried running the commands straight from the module:
form_main.activeform.suspendlayout
But it returned the following error:
An unhandled exception of type 'System.NullReferenceException' occurred
in Questionnaire - Employment Consultant.exe
Additional information: Object reference not set to an instance of an
object.
Anyhelp that anyone could provide to make this work would be much
appreciated, I really need to run these commands from multiple modules,
not just the Form_Main.VB where they run fine.
Yours sincerely,
Brent McIntyre
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!