Avoiding crashes in Designer Code

VBAHole22

Contributor
Joined
Oct 21, 2003
Messages
432
Location
VA
I'm trying to write some designer code that uses several properties on the control to call a web service and determine a possible set of values for another property. Sort of a discovery service for loading a combobox property.

The trouble is that the performance is very erratic. If there is some issue then studio just shuts down -bam! No warning or anything. The trouble is that this behavior is unpredicatable and not always repeatable.

My question is has anyone else experienced this and secondly are there certain things that always cause this that I can trap for?
 
I experience this kind of behavior alot in C# Express (and have experienced it from time to time in VB standard 2003) when creating Windows Form Controls. The controls can work perfectly at runtime, but when you switch tabs or click a different window in the IDE the whole thing dissappears. I have a tendancy to forget the save button, especially with temporary projects, and have lost hours of work a few times when the IDE vanished.

I actually lost a few days worth of work this way once. I scoured the hard drive for any copies of my code in temporary folders but instead managed to find an EXE which I had to decompile to get my code back, sans comments, for loops, XML code comments, etc.

Unfortunately I have no clue as to why it happens or how to fix it.
 
Well it's nice to have company in misery. I have gotten real good at compiling, saving and checking in to vss before attempting any design time testing. And I have noted that the crashes tend to decrease with compiled and checked in code if that means anything.

Sadly, we have studio 'plug-ins' (for lack of a better term, in vb6 I would call them ocx) that achieve what I am trying to do and I can't get it done. One difference between the two is that my prop is one hop away from the control, if that makes sense - I'm manipulating a property that is in the prop pane while the control is selected in the ide. The controls that I have seen work have their props nestled in a designer dialog that comes up when you click ... in the props of the control.
Not sure I'm relaying very well that idea. My prop is at one level like Text or Caption whereas those that I have seen work better are at a second level like the Font pop up dialog.

For all the good that came out of vs2005 there is always going to be something that gets bumped over to the next release. Hope this is on the radar for the next studio.

In general, working with design time stuff seems to be a wild frontier - can't get a hold of enough docs, samples, books, etc.
 
Back
Top