|
-
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!!
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
|