Win32 Exception error?

It’s very annoying to see a second double post when the poster doesn’t reply to the original after answers are given.

So allow me to answer directly and bluntly then.

For some reason my code:


You have shown us a cut off image of a class that is extending game1 for absolutely no reason and doesn’t use anything in game1 it also has a call to base.Draw which is a bad idea when you are not overriding the base class and your draw is local to the derived class and is callable from who knows were.


You then post another image that shows a error to code that is completely unrelated to the code shown in the image you just posted.

is outputting this error

But it is obviously not outputting this error…
component object model windows system 32 Winforms Forms dll (Dynamic Link Library) Exception.

it makes no sense why you would want to extend game1 to the class when you just want to call its method from game1 and then call base.Draw(gameTime); still ?

anyone know what to change?

Yes.

  1. Tell us what you’re actually trying to do because it is very likely you are trying to do something in completely the wrong way. Because the code you posted is nonsensical in the first place.

  2. Don’t post images of your code.
    Post your code using copy paste (control c in the ide the control v in this posting box), then use the preformatted text button.

  3. Post the actual game1 or the code that is calling the selection class and or the code that is calling the draw method. Which btw the actual drawing loop is fine in fact you can probably call that even from game1 if you had gotten rid of the base.draw call. But it would still make no sense.

  4. Tell me why you didn’t just use a drawable game component as i suggested in your other post or why you need to derive from game1 at all for what reason?
    Tell me why you aren’t adding begin end calls for spritebatch as others suggested to you more then once ?.

  5. Actually read and respond to reply’s instead of double posting the exact same question twice.

1 Like