In my new project I get this error when I debug the solution (hit f5). I never caught this one and it only happenes when I select my "LoginPage" as my Main Form in the Application Tab. Other form load just fine but when it comes to debugging with this form on Main Form it given the following exception :
An error occurred creating the form. See Exception.InnerException for details. The error is: Value cannot be null.
The above exception happens on the following section of my Application.Designer.vb :
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _ Protected Overrides Sub OnCreateMainForm() Me.MainForm = Global.MyProject.Login End Sub
FYI this form is solely designed to show GUI, nothing dynamic in it and I used DevExpress 12.1 for my visual styles and there are few of those components present in this form. There is no code executed when form loads except this :
Private Sub Login_Load(sender As Object, e As EventArgs) Handles MyBase.Load Try LoginBrowser.Navigate("https://google.com") WaitForLoginBrowser() Catch ex As Exception MsgBox("Apllication failed to connect to a google server.", MsgBoxStyle.OkOnly) Application.Exit() End Try 'Set Theme DevExpress.Skins.SkinManager.EnableFormSkins() DevExpress.UserSkins.BonusSkins.Register() UserLookAndFeel.Default.SetSkinStyle("Metropolis Dark") End Sub
DevExpress Components inside this form :