|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
VB 2005 Splash Screen ExceptionI'm running VB 2005 express on Windows 2000, SP 4. I have added a splash screen to my project, which was running error-free until then. The first time I run it each time I open the IDE, the splash screen shows, then the main form shows, just as intended. Each time after that, I get an exception. If I compile it and run the exe, the first time it runs as intended, and each time after it throws this exception. System.Transactions Critical: 0 : <TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Critical"><TraceIdentifier>http://msdn.microsoft.com/TraceCodes/System/ActivityTracing/2004/07/Reliability/Exception/Unhandled</TraceIdentifier><Description>Unhandled exception</Description><AppDomain>SI TreeView 1.vshost.exe</AppDomain><Exception><ExceptionType>System.NullReferenceException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType><Message>Object reference not set to an instance of an object.</Message><StackTrace> at System.Windows.Forms.Control.WaitForWaitHandle(WaitHandle waitHandle) at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous) at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args) at System.Windows.Forms.Control.Invoke(Delegate method) at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.HideSplashScreen() at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.MainFormLoadingDone(Object sender, EventArgs e) at System.EventHandler.Invoke(Object sender, EventArgs e) at System.Windows.Forms.Form.OnLoad(EventArgs e) at System.Windows.Forms.Form.OnCreateControl() at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) at System.Windows.Forms.Control.CreateControl() at System.Windows.Forms.Control.WmShowWindow(Message&amp; m) at System.Windows.Forms.Control.WndProc(Message&amp; m) at System.Windows.Forms.ScrollableControl.WndProc(Message&amp; m) at System.Windows.Forms.ContainerControl.WndProc(Message&amp; m) at System.Windows.Forms.Form.WmShowWindow(Message&amp; m) at System.Windows.Forms.Form.WndProc(Message&amp; m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp; m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp; m) at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd, Int32 nCmdShow) at System.Windows.Forms.Control.SetVisibleCore(Boolean value) at System.Windows.Forms.Form.SetVisibleCore(Boolean value) at System.Windows.Forms.Control.set_Visible(Boolean value) at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.Run(ApplicationContext context) at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun() at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel() at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine) at SI_TreeView_1.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81 at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args) at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart()</StackTrace><ExceptionString>System.NullReferenceException: Object reference not set to an instance of an object. at System.Windows.Forms.Control.WaitForWaitHandle(WaitHandle waitHandle) at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous) at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args) at System.Windows.Forms.Control.Invoke(Delegate method) at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.HideSplashScreen() at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.MainFormLoadingDone(Object sender, EventArgs e) at System.EventHandler.Invoke(Object sender, EventArgs e) at System.Windows.Forms.Form.OnLoad(EventArgs e) at System.Windows.Forms.Form.OnCreateControl() at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) at System.Windows.Forms.Control.CreateControl() at System.Windows.Forms.Control.WmShowWindow(Message&amp; m) at System.Windows.Forms.Control.WndProc(Message&amp; m) at System.Windows.Forms.ScrollableControl.WndProc(Message&amp; m) at System.Windows.Forms.ContainerControl.WndProc(Message&amp; m) at System.Windows.Forms.Form.WmShowWindow(Message&amp; m) at System.Windows.Forms.Form.WndProc(Message&amp; m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp; m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp; m) at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd, Int32 nCmdShow) at System.Windows.Forms.Control.SetVisibleCore(Boolean value) at System.Windows.Forms.Form.SetVisibleCore(Boolean value) at System.Windows.Forms.Control.set_Visible(Boolean value) at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.Run(ApplicationContext context) at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun() at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel() at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine) at SI_TreeView_1.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81 at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args) at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart()</ExceptionString></Exception></TraceRecord> I can't find the line of code that throws this error. I wonder if the code that throws the error is generated on the fly, seeing that the file in the text of the exception has a randomly-generated name: "17d14f5c-a337-4978-8281-53493378c1071.vb:line 81". This is besides the fact that I didn't write any code to use the splash screen or customize it. If I set the splash screen to "none" in the project properties, the project runs without errors. If I set it back to use the splash screen, I get the error. In the project properties, I enabled the "Enable XP Visual Styles", "Make Single Instance Application", "Save My.Settings on shutdown". Authentication mode is "Windows", shutdown mode is "when startup form closes", and SplashScreen is "Splashscreen1". I have scoured the groups, msdn and the Web and haven't found anything helpful. Sometimes folks will customize their splashscreen and get this exception, but then there is no answer. I really need to use a splash screen in this app because the main form has some processing to do before it displays. Any help is much appreciated! Peggy As a follow-up to my post, I found this work-around posted on MSDN.
However, I still get the error message when I try it. http://connect.microsoft.com/VisualStudio/feedback/Workaround.aspx?FeedbackID=114918 Has anyone been able to get it to work? I'd be interested in the details in how to make it work. Thanks. pbis***@hotmail.com wrote: Show quote > Hi, > > I'm running VB 2005 express on Windows 2000, SP 4. I have added a > splash screen to my project, which was running error-free until then. > The first time I run it each time I open the IDE, the splash screen > shows, then the main form shows, just as intended. Each time after > that, I get an exception. If I compile it and run the exe, the first > time it runs as intended, and each time after it throws this exception. > > System.Transactions Critical: 0 : <TraceRecord > xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" > Severity="Critical"><TraceIdentifier>http://msdn.microsoft.com/TraceCodes/System/ActivityTracing/2004/07/Reliability/Exception/Unhandled</TraceIdentifier><Description>Unhandled > exception</Description><AppDomain>SI TreeView > 1.vshost.exe</AppDomain><Exception><ExceptionType>System.NullReferenceException, > mscorlib, Version=2.0.0.0, Culture=neutral, > PublicKeyToken=b77a5c561934e089</ExceptionType><Message>Object > reference not set to an instance of an object.</Message><StackTrace> > at System.Windows.Forms.Control.WaitForWaitHandle(WaitHandle > waitHandle) > at System.Windows.Forms.Control.MarshaledInvoke(Control caller, > Delegate method, Object[] args, Boolean synchronous) > at System.Windows.Forms.Control.Invoke(Delegate method, Object[] > args) > at System.Windows.Forms.Control.Invoke(Delegate method) > at > Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.HideSplashScreen() > at > Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.MainFormLoadingDone(Object > sender, EventArgs e) > at System.EventHandler.Invoke(Object sender, EventArgs e) > at System.Windows.Forms.Form.OnLoad(EventArgs e) > at System.Windows.Forms.Form.OnCreateControl() > at System.Windows.Forms.Control.CreateControl(Boolean > fIgnoreVisible) > at System.Windows.Forms.Control.CreateControl() > at System.Windows.Forms.Control.WmShowWindow(Message&amp; m) > at System.Windows.Forms.Control.WndProc(Message&amp; m) > at System.Windows.Forms.ScrollableControl.WndProc(Message&amp; > m) > at System.Windows.Forms.ContainerControl.WndProc(Message&amp; m) > at System.Windows.Forms.Form.WmShowWindow(Message&amp; m) > at System.Windows.Forms.Form.WndProc(Message&amp; m) > at > System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp; > m) > at > System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp; > m) > at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, > Int32 msg, IntPtr wparam, IntPtr lparam) > at System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd, > Int32 nCmdShow) > at System.Windows.Forms.Control.SetVisibleCore(Boolean value) > at System.Windows.Forms.Form.SetVisibleCore(Boolean value) > at System.Windows.Forms.Control.set_Visible(Boolean value) > at > System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 > reason, ApplicationContext context) > at > System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 > reason, ApplicationContext context) > at System.Windows.Forms.Application.Run(ApplicationContext context) > at > Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun() > at > Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel() > at > Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] > commandLine) > at SI_TreeView_1.My.MyApplication.Main(String[] Args) in > 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81 > at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] > args) > at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence > assemblySecurity, String[] args) > at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() > at System.Threading.ThreadHelper.ThreadStart_Context(Object state) > at System.Threading.ExecutionContext.Run(ExecutionContext > executionContext, ContextCallback callback, Object state) > at > System.Threading.ThreadHelper.ThreadStart()</StackTrace><ExceptionString>System.NullReferenceException: > Object reference not set to an instance of an object. > at System.Windows.Forms.Control.WaitForWaitHandle(WaitHandle > waitHandle) > at System.Windows.Forms.Control.MarshaledInvoke(Control caller, > Delegate method, Object[] args, Boolean synchronous) > at System.Windows.Forms.Control.Invoke(Delegate method, Object[] > args) > at System.Windows.Forms.Control.Invoke(Delegate method) > at > Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.HideSplashScreen() > at > Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.MainFormLoadingDone(Object > sender, EventArgs e) > at System.EventHandler.Invoke(Object sender, EventArgs e) > at System.Windows.Forms.Form.OnLoad(EventArgs e) > at System.Windows.Forms.Form.OnCreateControl() > at System.Windows.Forms.Control.CreateControl(Boolean > fIgnoreVisible) > at System.Windows.Forms.Control.CreateControl() > at System.Windows.Forms.Control.WmShowWindow(Message&amp; m) > at System.Windows.Forms.Control.WndProc(Message&amp; m) > at System.Windows.Forms.ScrollableControl.WndProc(Message&amp; > m) > at System.Windows.Forms.ContainerControl.WndProc(Message&amp; m) > at System.Windows.Forms.Form.WmShowWindow(Message&amp; m) > at System.Windows.Forms.Form.WndProc(Message&amp; m) > at > System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp; > m) > at > System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp; > m) > at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, > Int32 msg, IntPtr wparam, IntPtr lparam) > at System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd, > Int32 nCmdShow) > at System.Windows.Forms.Control.SetVisibleCore(Boolean value) > at System.Windows.Forms.Form.SetVisibleCore(Boolean value) > at System.Windows.Forms.Control.set_Visible(Boolean value) > at > System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 > reason, ApplicationContext context) > at > System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 > reason, ApplicationContext context) > at System.Windows.Forms.Application.Run(ApplicationContext context) > at > Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun() > at > Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel() > at > Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] > commandLine) > at SI_TreeView_1.My.MyApplication.Main(String[] Args) in > 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81 > at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] > args) > at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence > assemblySecurity, String[] args) > at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() > at System.Threading.ThreadHelper.ThreadStart_Context(Object state) > at System.Threading.ExecutionContext.Run(ExecutionContext > executionContext, ContextCallback callback, Object state) > at > System.Threading.ThreadHelper.ThreadStart()</ExceptionString></Exception></TraceRecord> > > I can't find the line of code that throws this error. I wonder if the > code that throws the error is generated on the fly, seeing that the > file in the text of the exception has a randomly-generated name: > "17d14f5c-a337-4978-8281-53493378c1071.vb:line 81". This is besides > the fact that I didn't write any code to use the splash screen or > customize it. > > If I set the splash screen to "none" in the project properties, the > project runs without errors. If I set it back to use the splash screen, > I get the error. > > In the project properties, I enabled the "Enable XP Visual Styles", > "Make Single Instance Application", "Save My.Settings on shutdown". > Authentication mode is "Windows", shutdown mode is "when startup form > closes", and SplashScreen is "Splashscreen1". > > I have scoured the groups, msdn and the Web and haven't found anything > helpful. Sometimes folks will customize their splashscreen and get > this exception, but then there is no answer. > > I really need to use a splash screen in this app because the main form > has some processing to do before it displays. > > Any help is much appreciated! > > Peggy I have had users report the same problem, on Win2k systems. It seems that
the program looses the handle for the splash screen. I have come across other posts about this.I suggest that you just scrap your splash screen altogether. IMO it kicks in too late, anyway. <pbis***@hotmail.com> wrote in message Show quote news:1151353524.086937.108660@c74g2000cwc.googlegroups.com... > As a follow-up to my post, I found this work-around posted on MSDN. > However, I still get the error message when I try it. > http://connect.microsoft.com/VisualStudio/feedback/Workaround.aspx?FeedbackID=114918 > > Has anyone been able to get it to work? I'd be interested in the > details in how to make it work. > > Thanks. > > pbis***@hotmail.com wrote: >> Hi, >> >> I'm running VB 2005 express on Windows 2000, SP 4. I have added a >> splash screen to my project, which was running error-free until then. >> The first time I run it each time I open the IDE, the splash screen >> shows, then the main form shows, just as intended. Each time after >> that, I get an exception. If I compile it and run the exe, the first >> time it runs as intended, and each time after it throws this exception. >> >> System.Transactions Critical: 0 : <TraceRecord >> xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" >> Severity="Critical"><TraceIdentifier>http://msdn.microsoft.com/TraceCodes/System/ActivityTracing/2004/07/Reliability/Exception/Unhandled</TraceIdentifier><Description>Unhandled >> exception</Description><AppDomain>SI TreeView >> 1.vshost.exe</AppDomain><Exception><ExceptionType>System.NullReferenceException, >> mscorlib, Version=2.0.0.0, Culture=neutral, >> PublicKeyToken=b77a5c561934e089</ExceptionType><Message>Object >> reference not set to an instance of an object.</Message><StackTrace> >> at System.Windows.Forms.Control.WaitForWaitHandle(WaitHandle >> waitHandle) >> at System.Windows.Forms.Control.MarshaledInvoke(Control caller, >> Delegate method, Object[] args, Boolean synchronous) >> at System.Windows.Forms.Control.Invoke(Delegate method, Object[] >> args) >> at System.Windows.Forms.Control.Invoke(Delegate method) >> at >> Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.HideSplashScreen() >> at >> Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.MainFormLoadingDone(Object >> sender, EventArgs e) >> at System.EventHandler.Invoke(Object sender, EventArgs e) >> at System.Windows.Forms.Form.OnLoad(EventArgs e) >> at System.Windows.Forms.Form.OnCreateControl() >> at System.Windows.Forms.Control.CreateControl(Boolean >> fIgnoreVisible) >> at System.Windows.Forms.Control.CreateControl() >> at System.Windows.Forms.Control.WmShowWindow(Message&amp; m) >> at System.Windows.Forms.Control.WndProc(Message&amp; m) >> at System.Windows.Forms.ScrollableControl.WndProc(Message&amp; >> m) >> at System.Windows.Forms.ContainerControl.WndProc(Message&amp; m) >> at System.Windows.Forms.Form.WmShowWindow(Message&amp; m) >> at System.Windows.Forms.Form.WndProc(Message&amp; m) >> at >> System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp; >> m) >> at >> System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp; >> m) >> at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, >> Int32 msg, IntPtr wparam, IntPtr lparam) >> at System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd, >> Int32 nCmdShow) >> at System.Windows.Forms.Control.SetVisibleCore(Boolean value) >> at System.Windows.Forms.Form.SetVisibleCore(Boolean value) >> at System.Windows.Forms.Control.set_Visible(Boolean value) >> at >> System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 >> reason, ApplicationContext context) >> at >> System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 >> reason, ApplicationContext context) >> at System.Windows.Forms.Application.Run(ApplicationContext context) >> at >> Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun() >> at >> Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel() >> at >> Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] >> commandLine) >> at SI_TreeView_1.My.MyApplication.Main(String[] Args) in >> 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81 >> at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] >> args) >> at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence >> assemblySecurity, String[] args) >> at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() >> at System.Threading.ThreadHelper.ThreadStart_Context(Object state) >> at System.Threading.ExecutionContext.Run(ExecutionContext >> executionContext, ContextCallback callback, Object state) >> at >> System.Threading.ThreadHelper.ThreadStart()</StackTrace><ExceptionString>System.NullReferenceException: >> Object reference not set to an instance of an object. >> at System.Windows.Forms.Control.WaitForWaitHandle(WaitHandle >> waitHandle) >> at System.Windows.Forms.Control.MarshaledInvoke(Control caller, >> Delegate method, Object[] args, Boolean synchronous) >> at System.Windows.Forms.Control.Invoke(Delegate method, Object[] >> args) >> at System.Windows.Forms.Control.Invoke(Delegate method) >> at >> Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.HideSplashScreen() >> at >> Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.MainFormLoadingDone(Object >> sender, EventArgs e) >> at System.EventHandler.Invoke(Object sender, EventArgs e) >> at System.Windows.Forms.Form.OnLoad(EventArgs e) >> at System.Windows.Forms.Form.OnCreateControl() >> at System.Windows.Forms.Control.CreateControl(Boolean >> fIgnoreVisible) >> at System.Windows.Forms.Control.CreateControl() >> at System.Windows.Forms.Control.WmShowWindow(Message&amp; m) >> at System.Windows.Forms.Control.WndProc(Message&amp; m) >> at System.Windows.Forms.ScrollableControl.WndProc(Message&amp; >> m) >> at System.Windows.Forms.ContainerControl.WndProc(Message&amp; m) >> at System.Windows.Forms.Form.WmShowWindow(Message&amp; m) >> at System.Windows.Forms.Form.WndProc(Message&amp; m) >> at >> System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp; >> m) >> at >> System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp; >> m) >> at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, >> Int32 msg, IntPtr wparam, IntPtr lparam) >> at System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd, >> Int32 nCmdShow) >> at System.Windows.Forms.Control.SetVisibleCore(Boolean value) >> at System.Windows.Forms.Form.SetVisibleCore(Boolean value) >> at System.Windows.Forms.Control.set_Visible(Boolean value) >> at >> System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 >> reason, ApplicationContext context) >> at >> System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 >> reason, ApplicationContext context) >> at System.Windows.Forms.Application.Run(ApplicationContext context) >> at >> Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun() >> at >> Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel() >> at >> Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] >> commandLine) >> at SI_TreeView_1.My.MyApplication.Main(String[] Args) in >> 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81 >> at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] >> args) >> at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence >> assemblySecurity, String[] args) >> at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() >> at System.Threading.ThreadHelper.ThreadStart_Context(Object state) >> at System.Threading.ExecutionContext.Run(ExecutionContext >> executionContext, ContextCallback callback, Object state) >> at >> System.Threading.ThreadHelper.ThreadStart()</ExceptionString></Exception></TraceRecord> >> >> I can't find the line of code that throws this error. I wonder if the >> code that throws the error is generated on the fly, seeing that the >> file in the text of the exception has a randomly-generated name: >> "17d14f5c-a337-4978-8281-53493378c1071.vb:line 81". This is besides >> the fact that I didn't write any code to use the splash screen or >> customize it. >> >> If I set the splash screen to "none" in the project properties, the >> project runs without errors. If I set it back to use the splash screen, >> I get the error. >> >> In the project properties, I enabled the "Enable XP Visual Styles", >> "Make Single Instance Application", "Save My.Settings on shutdown". >> Authentication mode is "Windows", shutdown mode is "when startup form >> closes", and SplashScreen is "Splashscreen1". >> >> I have scoured the groups, msdn and the Web and haven't found anything >> helpful. Sometimes folks will customize their splashscreen and get >> this exception, but then there is no answer. >> >> I really need to use a splash screen in this app because the main form >> has some processing to do before it displays. >> >> Any help is much appreciated! >> >> Peggy > Thanks, Philip. That's what I ended up doing. My "custom" splash
screen was pretty easy to make and works right. Philip Sheard wrote: Show quote > I have had users report the same problem, on Win2k systems. It seems that > the program looses the handle for the splash screen. I have come across > other posts about this.I suggest that you just scrap your splash screen > altogether. IMO it kicks in too late, anyway. > > <pbis***@hotmail.com> wrote in message > news:1151353524.086937.108660@c74g2000cwc.googlegroups.com... > > As a follow-up to my post, I found this work-around posted on MSDN. > > However, I still get the error message when I try it. > > http://connect.microsoft.com/VisualStudio/feedback/Workaround.aspx?FeedbackID=114918 > > > > Has anyone been able to get it to work? I'd be interested in the > > details in how to make it work. > > > > Thanks. > > > > pbis***@hotmail.com wrote: > >> Hi, > >> > >> I'm running VB 2005 express on Windows 2000, SP 4. I have added a > >> splash screen to my project, which was running error-free until then. > >> The first time I run it each time I open the IDE, the splash screen > >> shows, then the main form shows, just as intended. Each time after > >> that, I get an exception. If I compile it and run the exe, the first > >> time it runs as intended, and each time after it throws this exception. > >> > >> System.Transactions Critical: 0 : <TraceRecord > >> xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" > >> Severity="Critical"><TraceIdentifier>http://msdn.microsoft.com/TraceCodes/System/ActivityTracing/2004/07/Reliability/Exception/Unhandled</TraceIdentifier><Description>Unhandled > >> exception</Description><AppDomain>SI TreeView > >> 1.vshost.exe</AppDomain><Exception><ExceptionType>System.NullReferenceException, > >> mscorlib, Version=2.0.0.0, Culture=neutral, > >> PublicKeyToken=b77a5c561934e089</ExceptionType><Message>Object > >> reference not set to an instance of an object.</Message><StackTrace> > >> at System.Windows.Forms.Control.WaitForWaitHandle(WaitHandle > >> waitHandle) > >> at System.Windows.Forms.Control.MarshaledInvoke(Control caller, > >> Delegate method, Object[] args, Boolean synchronous) > >> at System.Windows.Forms.Control.Invoke(Delegate method, Object[] > >> args) > >> at System.Windows.Forms.Control.Invoke(Delegate method) > >> at > >> Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.HideSplashScreen() > >> at > >> Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.MainFormLoadingDone(Object > >> sender, EventArgs e) > >> at System.EventHandler.Invoke(Object sender, EventArgs e) > >> at System.Windows.Forms.Form.OnLoad(EventArgs e) > >> at System.Windows.Forms.Form.OnCreateControl() > >> at System.Windows.Forms.Control.CreateControl(Boolean > >> fIgnoreVisible) > >> at System.Windows.Forms.Control.CreateControl() > >> at System.Windows.Forms.Control.WmShowWindow(Message&amp; m) > >> at System.Windows.Forms.Control.WndProc(Message&amp; m) > >> at System.Windows.Forms.ScrollableControl.WndProc(Message&amp; > >> m) > >> at System.Windows.Forms.ContainerControl.WndProc(Message&amp; m) > >> at System.Windows.Forms.Form.WmShowWindow(Message&amp; m) > >> at System.Windows.Forms.Form.WndProc(Message&amp; m) > >> at > >> System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp; > >> m) > >> at > >> System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp; > >> m) > >> at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, > >> Int32 msg, IntPtr wparam, IntPtr lparam) > >> at System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd, > >> Int32 nCmdShow) > >> at System.Windows.Forms.Control.SetVisibleCore(Boolean value) > >> at System.Windows.Forms.Form.SetVisibleCore(Boolean value) > >> at System.Windows.Forms.Control.set_Visible(Boolean value) > >> at > >> System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 > >> reason, ApplicationContext context) > >> at > >> System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 > >> reason, ApplicationContext context) > >> at System.Windows.Forms.Application.Run(ApplicationContext context) > >> at > >> Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun() > >> at > >> Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel() > >> at > >> Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] > >> commandLine) > >> at SI_TreeView_1.My.MyApplication.Main(String[] Args) in > >> 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81 > >> at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] > >> args) > >> at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence > >> assemblySecurity, String[] args) > >> at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() > >> at System.Threading.ThreadHelper.ThreadStart_Context(Object state) > >> at System.Threading.ExecutionContext.Run(ExecutionContext > >> executionContext, ContextCallback callback, Object state) > >> at > >> System.Threading.ThreadHelper.ThreadStart()</StackTrace><ExceptionString>System.NullReferenceException: > >> Object reference not set to an instance of an object. > >> at System.Windows.Forms.Control.WaitForWaitHandle(WaitHandle > >> waitHandle) > >> at System.Windows.Forms.Control.MarshaledInvoke(Control caller, > >> Delegate method, Object[] args, Boolean synchronous) > >> at System.Windows.Forms.Control.Invoke(Delegate method, Object[] > >> args) > >> at System.Windows.Forms.Control.Invoke(Delegate method) > >> at > >> Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.HideSplashScreen() > >> at > >> Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.MainFormLoadingDone(Object > >> sender, EventArgs e) > >> at System.EventHandler.Invoke(Object sender, EventArgs e) > >> at System.Windows.Forms.Form.OnLoad(EventArgs e) > >> at System.Windows.Forms.Form.OnCreateControl() > >> at System.Windows.Forms.Control.CreateControl(Boolean > >> fIgnoreVisible) > >> at System.Windows.Forms.Control.CreateControl() > >> at System.Windows.Forms.Control.WmShowWindow(Message&amp; m) > >> at System.Windows.Forms.Control.WndProc(Message&amp; m) > >> at System.Windows.Forms.ScrollableControl.WndProc(Message&amp; > >> m) > >> at System.Windows.Forms.ContainerControl.WndProc(Message&amp; m) > >> at System.Windows.Forms.Form.WmShowWindow(Message&amp; m) > >> at System.Windows.Forms.Form.WndProc(Message&amp; m) > >> at > >> System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp; > >> m) > >> at > >> System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp; > >> m) > >> at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, > >> Int32 msg, IntPtr wparam, IntPtr lparam) > >> at System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd, > >> Int32 nCmdShow) > >> at System.Windows.Forms.Control.SetVisibleCore(Boolean value) > >> at System.Windows.Forms.Form.SetVisibleCore(Boolean value) > >> at System.Windows.Forms.Control.set_Visible(Boolean value) > >> at > >> System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 > >> reason, ApplicationContext context) > >> at > >> System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 > >> reason, ApplicationContext context) > >> at System.Windows.Forms.Application.Run(ApplicationContext context) > >> at > >> Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun() > >> at > >> Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel() > >> at > >> Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] > >> commandLine) > >> at SI_TreeView_1.My.MyApplication.Main(String[] Args) in > >> 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81 > >> at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] > >> args) > >> at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence > >> assemblySecurity, String[] args) > >> at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() > >> at System.Threading.ThreadHelper.ThreadStart_Context(Object state) > >> at System.Threading.ExecutionContext.Run(ExecutionContext > >> executionContext, ContextCallback callback, Object state) > >> at > >> System.Threading.ThreadHelper.ThreadStart()</ExceptionString></Exception></TraceRecord> > >> > >> I can't find the line of code that throws this error. I wonder if the > >> code that throws the error is generated on the fly, seeing that the > >> file in the text of the exception has a randomly-generated name: > >> "17d14f5c-a337-4978-8281-53493378c1071.vb:line 81". This is besides > >> the fact that I didn't write any code to use the splash screen or > >> customize it. > >> > >> If I set the splash screen to "none" in the project properties, the > >> project runs without errors. If I set it back to use the splash screen, > >> I get the error. > >> > >> In the project properties, I enabled the "Enable XP Visual Styles", > >> "Make Single Instance Application", "Save My.Settings on shutdown". > >> Authentication mode is "Windows", shutdown mode is "when startup form > >> closes", and SplashScreen is "Splashscreen1". > >> > >> I have scoured the groups, msdn and the Web and haven't found anything > >> helpful. Sometimes folks will customize their splashscreen and get > >> this exception, but then there is no answer. > >> > >> I really need to use a splash screen in this app because the main form > >> has some processing to do before it displays. > >> > >> Any help is much appreciated! > >> > >> Peggy > > |
|||||||||||||||||||||||