|
I am getting the following exception:
"System.ExecutionEngineException In System.Windows.Forms.Dll"
... and it is occuring when the code is just about to exit the Static void Main block:
[STAThread]<br />
static void Main() <br />
{<br />
Application.Run(new Form1());<br />
}
Has anyone any idea of what could be causing this?
Cheers
|
|
|
|
|
I would check the destructor of Form1 or one of its object's dtors. A stack trace would be of great help.
|
|
|
|
|
do you have some kind of Active X or image you are using ?
try to trace the constructor
put a break point in Form1's ctor and try debuging from there
u will be doing F11 not the F10 which skips method debuging.
and step by step you will know exact where it fails.
Paresh;)
|
|
|
|
|
I don't have any controls on the form at all.
What I do have in the form object is 4 objects instantiated from very similar classes in which I read data from btrieve table files destroy the data read and then it appears that when the 4th object has finished the form object has been GC'ed. I haven't put any destructors in for these objects and beleive this is the problem, as if I only instantiate one or two of these classes I don't lose the form object!
|
|
|
|
|
ExecutionEngineException is a kinda equivalent to the old Dr. Watson for Windows. If something that mscorlib or mscoree.dll (the .NET CLR) could not handle, it would throw this exception.
Any misconfigured or mailfunctioning COM components that you are using, might cause your RunTime to fail with this exception.
Deepak Kumar Vasudevan
http://deepak.portland.co.uk/
|
|
|
|
|
I want to draw a rectangle, circle ... or any shape on the document. How to move it and resize it on anywhere in document. Document can be drag on scrollbar.
|
|
|
|
|
can't you use it's
Location
Size
Property ?
|
|
|
|
|
I draw a shape (g.drawRectangle ... ) at point P. I want to move it to another point. When i move mouse to head of shape , mouse must be move-icon. Where else is mouse default ...Thanks
|
|
|
|
|
I am looking for some sample code to produce a "knight rider" style progress bar, does anybody have an sample code that produces this effect??
I had a look around on CP, but couldnt find anything. With the exception of :
http://www.codeproject.com/cs/miscctrl/progressbar.asp[^]
But unfortunatly the code is massive and my C# skills arent good enough to break it down to find what I need
|
|
|
|
|
I did one! I did one!.. Although its not entirely the same as the knight rider bar. Crap, it's part of my main lib, maybe I can rip it out for you. Although this particular one was done in VB, so maybe you would want to convert it...
Anyway, here it is have fun!
Busy Bar Test - Binary in there too.
Oh one more thing,... dont forget to turn the thing off (Disable it) when cleaning up the form it is on, because that damn Timer will keep the form alive indefinitely if you don't.
|
|
|
|
|
Absolutly brilliant
but (there is always a but)
Unfortunaltly its to fancy for the spec I am working too?!?! Boss man just wants a simple progress bar style that goes backwards and forwards.
I have been playing around and I get seem to find an option to set a minvalue for the bar - does this even exist?
|
|
|
|
|
MinValue? You can adjust the number of trails (.Trails) that are drawn (number of rectangles that make up the moving bar).. You can also adjust how often it gets updated. I guess if you up the time it is updated, adjust .speed a bit, and drop the trails to say, 20-30, it would be pretty fast on low end machines.
|
|
|
|
|
you will need to develop of your own/
you can develop the control where blocks are rectangle and colored with some black color (define a property) and when increased increases the counts of the rectangle with refresh.
Paresh
|
|
|
|
|
I want to setup a remote singleton that keeps a sequence (and increments it). I get the last sequence number from a database and before the object is garbage collected i want to save the value back to the database.
Should/Can i implement this in the singleton's finalize method or is there someway to use ILease and when Sponsorship times out, then save to the database?
|
|
|
|
|
|
MarshalByRefObject doesnt derive from Componnet so doesnt have Dispose, and you need to derive a remoted object from MarshalByRefObject.
|
|
|
|
|
check out this site itself there is a singleton sample !!!
|
|
|
|
|
I know that. I am using it as a base for some work that i am doing. But i dont know when the remoted object is destroyed, so i wanted to know about Finalize, since MarshalByRefObject doesnt derive from Componnet so doesnt have Dispose.
|
|
|
|
|
Hi friends
As you know, within a class, we can refer to the current instance of class with 'this' keyword. Now suppose that I have 2 classes : ClassA & ClassB, is it possible to get the current instance of ClassA from within ClassB ?
|
|
|
|
|
Having two classes is not the same as having two objects. The this keyword refers to the current instance defined by a class. So, from within the class definition of an object, one may retrieve a reference to and operate on itself using this . However, current instance has no meaning with regard to any other object (including other ClassBs) without some context: e. g. being passed or instanciating a reference to that other class. Consider: what does current instance mean if there are ten instances? Which one is current?
class ClassA
{
public Foo()
{ ... }
}
class ClassB
{
ClassB(ClassA classA)
{
classA.Foo ();
this.Bar ();
ClassB classB = new ClassB (classA);
classB.Bar ();
}
public Bar()
{ ... }
static Main()
{
ClassA cA1 = new ClassA ();
ClassA cA2 = new ClassA ();
...
ClassA cA10 = new ClassA ();
ClassB cB = new ClassB (cA1);
}
}
In Main() there are ten instances of ClassA (cA1 - cA10) and one of ClassB (cB). The only (non-static) objects that cB may operate on are
- itself
- ClassA instance cA1
- the internally created instance of ClassB: classB
I sure hope this helps.
α.γεεκ Fortune passes everywhere. Duke Leto Atreides
|
|
|
|
|
Thanks! your answer is complete and appreciated!
Regards
|
|
|
|
|
yes.
you pass the object of this class in ctor of another class.
that's it.
-Paresh
|
|
|
|
|
The free obfuscator with VS.net is the preemptive.com community edition. On the preemptive site it says it's only for acadamic and personal use.
So does that mean if you buy VS.Net 2003 and obfuscate your code with it, that you can't sell your app?
I'm looking for a url to some Microsoft legal that says there are no restrictions to the bundled version of the dotfuscator. If anyone wants to respond with just conjecture and guesses, no thanks, I need a url. I need legalese.
thanks in advance if you have a URL,
"Outside of a dog, a book is Man’s best friend. And inside of a dog, it’s too dark to read."
-Groucho Marx
|
|
|
|
|
I would imagine you could find the text of the EULA for dotfuscator somewhere on the VS.NET 2003 CDs. That would tell you for sure what you are allowed to do.
James
"It is self repeating, of unknown pattern"
Data - Star Trek: The Next Generation
|
|
|
|
|
the dotfuscator shipped with 2003 is the "community edition" of the dotfuscator and
i would GUESS that the same rules apply if you get it from vs.net2003 or from their site.
also the community edition is not very good , it does merely change method/prop names , nothing else...
we use the full version which has workflow obfuscation , break ildasm , string encryption and shite , works lovely..
//Roger
|
|
|
|