|
-
Apr 23rd, 2004, 01:28 AM
#1
check it out, weird error from combo box
This is weird, I even started a new project to prove I'm not doing anythign wrong. When you have visual styles enabled, if you load a form using the ShowDialog method in the selectedIndexChanged event of the combo box, you get an error (I'm sure it has nothing to do with the combo box, it's just a situation when it happens. Apparently it has to do with visual styles and the ShowDialog method). Try this:
In a new project add a combo box to a form (called Form1 here) and add a bunch of items into the combo box. Then add this code:
VB Code:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Application.EnableVisualStyles()
End Sub
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
Dim frm As New Form1
frm.ShowDialog()
End Sub
Run the app. Now select an item from the combo box and a new form pops up, repeat this again and then close the second form that pops up and wait a few seconds,... dont you get an error?
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Apr 23rd, 2004, 01:34 AM
#2
Lively Member
An unhandled exception of type 'System.Runtime.InteropServices.SEHException' occurred in system.windows.forms.dll
Additional information: External component has thrown an exception.
Thats what I get.
James
Visual Studio .net 2003 EA
VB .net
C#
-
Apr 23rd, 2004, 01:35 AM
#3
wow man, this is pretty stupid. Apparently an obvious bug ha?
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Apr 23rd, 2004, 01:45 AM
#4
-
Apr 23rd, 2004, 01:50 AM
#5
Lively Member
Visual Studio .net 2003 EA
VB .net
C#
-
Apr 23rd, 2004, 02:17 AM
#6
haha interesting! it's better not to use that evil. Apparently there are many other problems with it. Shame on microsoft
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Feb 2nd, 2006, 11:30 AM
#7
Re: check it out, weird error from combo box
I just ran into this problem today. I know its an old thread.. but I figured I would post since I was trying to find a solution and apparently there is none (other than NOT using enablevisualstyles)
I did find out that MS at least DOES know about it.. although I guess they are not fixing it?
I know that there is going to be another service pack for VS.NET 2003 in the second 1/4 of this year.
from MSKB
You may receive the same error message that is discussed in the "Symptoms" section when you use the ShowDialog method to open a form. To work around this behavior, use the Show method instead of the ShowDialog method.
hardly a workaround being that show and showdialog have totally different behavior..
-
Feb 2nd, 2006, 11:56 AM
#8
Re: check it out, weird error from combo box
Did you try calling InitCustomControlsEx as the first step of your app?
(I don't use Windows eXtreme Paintset so can't test it myself)
-
Feb 2nd, 2006, 12:04 PM
#9
Re: check it out, weird error from combo box
 Originally Posted by Merrion
Did you try calling InitCustomControlsEx as the first step of your app?
(I don't use Windows eXtreme Paintset so can't test it myself)
I don't know what that is? Is it an API function or something?
The only solutions MS has provided is to do what I said above, or use a manifest file instead of Application.EnableVisualStyles
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|