JFK
Member
I need solve problem with my MDI and child forms. When user select (thru menu), which child form he wants to show, I would like to check, if user has permission for it. If not, dont want to show child form.
I'm not shure, that I am going the right way, but in VB6 it worked OK. Not in VB.NET.
1) I call frmChildForm.show from MDI.menu_onClick event.
2) in frmChildForm_Load i check for permissions and call Me.Hide for frmChildForm object
3) in frmChildForm_Activated I call Me.Close for frmChildForm object
After that, I receive error:
***************************
An unhandled exception of type 'System.InvalidOperationException' occurred in system.windows.forms.dll
Additional information: Cannot call Close() while doing CreateHandle().
***************************
What is wrong? Any ideas?
Any advice will be appreciated.
Regards. #JFK
I'm not shure, that I am going the right way, but in VB6 it worked OK. Not in VB.NET.
1) I call frmChildForm.show from MDI.menu_onClick event.
2) in frmChildForm_Load i check for permissions and call Me.Hide for frmChildForm object
3) in frmChildForm_Activated I call Me.Close for frmChildForm object
After that, I receive error:
***************************
An unhandled exception of type 'System.InvalidOperationException' occurred in system.windows.forms.dll
Additional information: Cannot call Close() while doing CreateHandle().
***************************
What is wrong? Any ideas?
Any advice will be appreciated.
Regards. #JFK