HeavenCore
Well-known member
OK, quick question, i have many forms that are all based on a custom permissions system, basically when a form loads i wish to check the permission, if false unload the form.
eg:
This however throws up the error:
"Value Close() cannot be called while doing CreateHandle()"
understandable really, so what would be the best way of doing this?
any help would be great
Regards
HC.
eg:
VB.NET:
Private Sub frmClients_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If PermClientViewForm = False Then
MessageBox.Show("Sorry, bla bla", ApplicationName & " - Permissions")
Me.Close()
End If
End Sub
This however throws up the error:
"Value Close() cannot be called while doing CreateHandle()"
understandable really, so what would be the best way of doing this?
any help would be great
Regards
HC.