Tim Dol
|
|
Group: Forum Members
Posts: 340,
Visits: 1.4K
|
I'm testing my application on a windows 2003 machine. Everything seems to be working okay except for my browse dialog. I receive the following error when I click the Browse. Any Ideas? Thanks, Tim InvalidOperationException Visual Styles-related operation resulted in an error because no visual style is currently active. Source : System.Windows.Forms Stack Trace: at System.Windows.Forms.VisualStyles.VisualStyleRenderer.IsCombinationDefined(String className, Int32 part) at System.Windows.Forms.VisualStyles.VisualStyleRenderer..ctor(String className, Int32 part, Int32 state) at System.Windows.Forms.ScrollBarRenderer.InitializeRenderer(VisualStyleElement element, Int32 state) at System.Windows.Forms.ScrollBarRenderer.GetSizeBoxSize(Graphics g, ScrollBarState state) at MicroFour.StrataFrame.UI.Windows.Forms.BrowseDialogWindow.PositionControls(Control& ParentControl) at MicroFour.StrataFrame.UI.Windows.Forms.BrowseDialogWindow.AddSearchFields() at MicroFour.StrataFrame.UI.Windows.Forms.BrowseDialogWindow..ctor(BrowseDialog BrowseDialogSettings, Boolean PopulateOnShow) at MicroFour.StrataFrame.UI.Windows.Forms.BrowseDialog.ShowDialog(Boolean PopulateOnShow) at MicroFour.StrataFrame.UI.Windows.Forms.BrowseDialog.ShowDialog() at MicroFour.StrataFrame.UI.Windows.Forms.MaintenanceFormToolStrip.cmdBrowse_Click(Object sender, EventArgs e) at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e) at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e) at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e) at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e) at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met) at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met) at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ScrollableControl.WndProc(Message& m) at System.Windows.Forms.ToolStrip.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
|
|
|
Trent Taylor
|
|
Group: StrataFrame Developers
Posts: 6.6K,
Visits: 6.9K
|
It looks like a visualizer error. Since you are running on a server, themes are turned off by default, and certain controls try to user the Visualizers to render portions of the controls. Off of the top of my head I cannot think of what the BrowseDialog is doing here, but try this: - Click Start -> Run
- Type Services.msc and press Enter
- Navigate to the Themes service
- Double-Click on the Themes service to open the properties
- Change the Startup Type from Disabled to Automatic
- Click Apply - > click OK
- Start the Themes service
- Try running the browse dialog again
Let me know if this fixes (or doesn't fix) your problem.
|
|
|
Tim Dol
|
|
Group: Forum Members
Posts: 340,
Visits: 1.4K
|
Didn't make any difference. Still get the error. Tim
|
|
|
Tim Dol
|
|
Group: Forum Members
Posts: 340,
Visits: 1.4K
|
Trent, I may have pinpointed the problem for you. One of the search fields on my browse dialog was a date field. When I removed this field from the search fields list the error went away. When I added it back, the error returned, so it must be specific to the date field. The date field works fine on XP. Hopefully it's something simple.
|
|
|
Trent Taylor
|
|
Group: StrataFrame Developers
Posts: 6.6K,
Visits: 6.9K
|
Tim, I did a google search and this is an issue with the DateTimePicker control it looks like. The problem is that there is no visual style active on the machine (Themes is just the first step). The DateTimePicker requires the use of the Visualizer classes in order to render the Combo arrows. On that same server, try setting the Appearance to the same Theme as Windows XP Blue and see if the error persists.
|
|
|
Tim Dol
|
|
Group: Forum Members
Posts: 340,
Visits: 1.4K
|
Yes that worked Trent. Thanks
|
|
|
Larry Caylor
|
|
Group: Awaiting Activation
Posts: 592,
Visits: 3.7K
|
I just tripped into this issue when I tried to deploy my application to a PC running Windows 2000 Pro. The application aborts with a Visual Styles error when the user selects a browse dialog that contains a DateTimePicker control. (When running with the ES server the program aborts with an unhandled exception) However if create an new SF application with a single form that contains a standard MS DateTimePicker or a SF DateTimePicker and run the application, the controls render properly and I can click on the drop down. It would appear that is something about the way the control is being used in the browse dialog that is causing the program to fail. This is an issue for me since I have a lot of Windows 2000 Pro systems. -Larry
|
|
|
Trent Taylor
|
|
Group: StrataFrame Developers
Posts: 6.6K,
Visits: 6.9K
|
We will setup a Windows 2000 Pro virtual machine and test this to see if there is something that we can do about this. We just use a standard DateTimePicker, so this is a bit odd...however, we have seen this type of thing before when the Visual Renderers are used within certain environments and the DateTimePicker may be doing something out of context. We will investigate further. Thanks.
|
|
|
Larry Caylor
|
|
Group: Awaiting Activation
Posts: 592,
Visits: 3.7K
|
You can reproduce the problem in Windows XP by setting the Windows theme to 'Windows Classic". Attached is an example of how the error manifests itself when the application is using ES as the data source (My app is called BathcTracker). I looked up Event Type: clr20r3 in the Microsoft knowledge base and it returned article 911816 "Unhanded exceptions cause ASP.Net-based application to unexpectedly quit in the .NET Framework 2.0". You may want to look at the article to see if their resolution is something that should be incorporated in ES to better handle unexpected exceptions. -Larry
|
|
|
Trent Taylor
|
|
Group: StrataFrame Developers
Posts: 6.6K,
Visits: 6.9K
|
Thanks for the infor...it does look like the DateTimePicker is relying on the Visual Styles for rendering....hmmmm, I will have to work on this
|
|
|