Hi all im new to vb.net I have created a module and I am trying to create a procedure inside the module to control certain form properties such as centring the forms on the users screen on runtime.
Im not to sure which procedure to use i.e. function procedure or sub procedure. Im pretty sure it the sub procedure
here is my code
Module centreform
'create a sub
Sub centreform(ByVal FormName As Form)
Me.Enabled.CenterToScreen()
End Sub
End Module
I know that this can be done on form load by just adding
Me.Enabled.CenterToScreen() to form load but i want to do it the module way.
when i use this code it says me is not valid in a module
any help would be greatly appreciated
Im not to sure which procedure to use i.e. function procedure or sub procedure. Im pretty sure it the sub procedure
here is my code
Module centreform
'create a sub
Sub centreform(ByVal FormName As Form)
Me.Enabled.CenterToScreen()
End Sub
End Module
I know that this can be done on form load by just adding
Me.Enabled.CenterToScreen() to form load but i want to do it the module way.
when i use this code it says me is not valid in a module
any help would be greatly appreciated