I'm having an issue in creating a custom principal on a login form for my application.
I load the application and then throw up a login dalog on the main forms shown event.
i have a custom prinicpal class that i apply to the current thread in the login dialog and that works fine when i call the show method on the login form, however when i display the login form with the showdialog method the setting of the current principal
does not persist
I guess this is because the showdialog method is called on a seperate thread?
I did attempt to apply the prinical to the whole application by using AppDomain.CurrentDomain.SetThreadPrincipal(principle) but this failed to set the principal for the whole application?
If anyone could explain to me what is happening that would be good.
please see code below for further information
Public Class Form1
Private Sub Form1_Shown(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Shown
Dim Login As New LoginForm
Private Sub Button1_Click(ByVal sender As System.Object, ByVal
View Complete Post