<STAThread()> _ Public Shared Sub Main() Try ' Assign current windows user to thread that runs the application AppDomain.CurrentDomain.SetPrincipalPolicy _ (System.Security.Principal.PrincipalPolicy.WindowsPrincipal) ' Verify current user membership in windows authentication ' security groups If System.Threading.Thread.CurrentPrincipal.Identity.IsAuthenticated Then If System.Threading.Thread.CurrentPrincipal.IsInRole("YOUR.COM\YourAppUsers") _ Or System.Threading.Thread.CurrentPrincipal.IsInRole("YOUR.COM\YourAppUsers") Then Try ' Instantiate the main application form If result = DialogResult.OK Then Application.Run(New MainForm) End If Catch e As Exception ' Write the error to the application log Something.Log.WriteException(e) ' Display the Exception form Dim ExceptForm As New mmExceptionForm(e.Message, e.StackTrace) ExceptForm.ShowDialog() Finally End Try End If End If...