Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / March 2006

Tip: Looking for answers? Try searching our database.

problem with picturebox

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ma - 12 Mar 2006 19:04 GMT
Hello,

   I am new in  .NET and I am writing my first program in c++/CLI on MSVC
2005.

I add a PictureBox to my form and then using its properties I change its
image property to one image from my hard disk. it generate the following
code  for me:

this->image1->Image = (cli::safe_cast<System::Drawing::Image^
>(resources->GetObject(L"image1.Image")));

but when I am running my program, it generate an exception with the error
that it couldn't find the specified objects in my resources.  I checked the
resource and there is no resource with this name there.

What is wrong with this?

Best regards
Bruno van Dooren - 12 Mar 2006 20:39 GMT
Signature

Kind regards,
   Bruno.
   bruno_nos_pam_van_dooren@hotmail.com
   Remove only "_nos_pam"

> Hello,
>
[quoted text clipped - 16 lines]
>
> Best regards
Bruno van Dooren - 12 Mar 2006 20:47 GMT
> Hello,
>
[quoted text clipped - 14 lines]
>
> What is wrong with this?

I just did the same thing: added a picture box and assigned it an image.
if you double click the resource, you can select the type of resources that
you want displayed.
if you select 'images' you should see the different images that are embedded
in the resource file.

If there is nothing there, you will get that exception.
I suggest you try to find out why it is not there. Possibly a permission
problem or something else?

btw: there is also a dedicated C++ .NET newsgroup:
public.dotnet.languages.vc

Signature

Kind regards,
   Bruno.
   bruno_nos_pam_van_dooren@hotmail.com
   Remove only "_nos_pam"


Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.