Images on VC.Net Forms

D

David Battams

Hi there,

Quick question about VC.Net forms.

The second I add a picture pox with associated image to my form, my app goes
off into the weeds in the form designer code at the line where it tries to
read the image resource from the resource manager.

It's a mixed mode app, and I quickly worked out I had to undefine GetObject
so the code would build, but the code now fails on the ResourceManager
GetObject call.

I've gotten around this temporarily by loading my resources from a file
using Image::FromFile to load my images, but I must be missing something
obvious here?

Regards,
David.
 
D

David Battams

Tested this in a pure managed C++ app and it works fine. Why would this be
an issue for a mixed mode application? Bug?

The images display fine in Design mode in the mixed mode app.

Seems like the for questions I ask, no one ever has a clue. I can't be the
only one to hit these things?? :)

David.
 
J

Jens Thiel

David Battams said:
Tested this in a pure managed C++ app and it works fine. Why would this be
an issue for a mixed mode application? Bug?

The images display fine in Design mode in the mixed mode app.

Seems like the for questions I ask, no one ever has a clue. I can't be the
only one to hit these things?? :)

No, I am reading your questions with interest ;-)

I already gave up on some things with mixed-mode projects. The VS.2003
compiler/IDE has to much -- ehm -- "weaknesses" that I already spent a few
nights on. At some point I decided to port major parts to C#, and that was a
really good decision.

The few forms left in managed C++ can still not be designed. I keep a "pure"
managed C++ project that I use only for design, and copy/paste the modified
source...

And thanks for sharing your experiences with the managed / native interface
in the other NG :)

Jens.
 
D

David Battams

Hi Jens,

Thanks for the reply. Yeah, seems that mixed mode has some issues. I've only
got one form in my mixed mode guy so I've only just hit this stuff. I've
also noticed the form designer doesn't like nested namespaces at all.

Thanks for the tips.

David.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top