Lewisburg, PA "Next year Raiders in the Super Bowl"
Posts
1,310
this is rather neat....or NOT!...combo box doesn't work in winxp
this is rather interesting. i have been writing this db app on a win2k machine, everything has been working perfect. i put it on my laptop to test it with winxp...keeping in mind, in my Sub Main i have Application.EnableVisualStyles() and all control that have the FlatStyle property are set to System. Like i said everything works fine in win2k. Now i have a DLL that has a class that derives a base class that is a form used for adding and edited, based upon what constructor is call. when the form is shown it's shown as a ShowDialog(). Everything works on the form when displayed and you do all the things you would or could want to do with all the controls and fields and buttons and whatever...EXCEPT...HAHAHA...this one combo box that is populated with data from an array, just loading US States. when you click on it to drop...oh it does that just fine...but when you start to scroll the app crashes, burns, and pukes. so just for s*** and giggles...i commented out the Application.EnableVisualStyles()....and ***POOF*** IT FREAKING WORK FINE!!!!! Can ANYONE possible give me any idea WHY? this is me -->
If anyone would like to see the code i will gladly zip it up and put in on the forum with the database.
just an FYI: total size of everything is a little over 3MB unzipped.
thanx to anyone that might have a clue...or not...or just feels like writing crap because i want to cry.
later
Last edited by vbdotnetboy; Jun 24th, 2004 at 08:50 AM.
Derek - Using VS 2008 99% of the time and VS 2003 1% of the time
Lewisburg, PA "Next year Raiders in the Super Bowl"
Posts
1,310
ok after a serious stepping through the code i've narrowed it down that my error is happening in the system.windows.forms.dll...freaking MS....the exception error is: An unhandled exception of type 'System.NullReferenceException' occurred in system.windows.forms.dll....can someone give me a *** please....continuing to work with this ISSUE....
thanx
Derek - Using VS 2008 99% of the time and VS 2003 1% of the time
Lewisburg, PA "Next year Raiders in the Super Bowl"
Posts
1,310
ATTENTION: MS FIX THE FORM.DLL...the only way i can get the app not to crash in winxp is to comment out the EnableVisualStyles()...then the app works fine on winxp and i can scroll up and down all day with the combo box...
if anyone else has had this problem please let me know just for my own sense of mind...
thanx
Derek - Using VS 2008 99% of the time and VS 2003 1% of the time
The EnableVisualStyles function is so full of bugs. It's actually best not to use it, but include a manifest file instead.
Another workaround could be to use Application.Doevents right after the call to EnableVisualStyles and make sure both calls are the very first to be called in Sub Main.
Hope this helps.
I wish I could think of something witty to put in my sig...
Lewisburg, PA "Next year Raiders in the Super Bowl"
Posts
1,310
didn't try the doevents after the EVS....i'll give that a try and let you know how things go...thanx for letting me know about the EVS as far as the bugs....thanx again and i'll let you know how i make out...if the doevents doesn't help i'm just going to take the EVS out...thanx one more time.
Derek - Using VS 2008 99% of the time and VS 2003 1% of the time
I have attached a manifest file you can use.
All you have to do is unzip it, rename it to YourExeName.exe.manifest and put it in the same directory as the exe itself. Then it will automatically use visualstyles on XP. Just remember to set the FlatStyle property of buttons etc. to System.
I hope you can use this. I use this file all the time, and I never had problems with it.
I wish I could think of something witty to put in my sig...