PC Review


Reply
Thread Tools Rate Thread

Bitmap problem

 
 
Aris
Guest
Posts: n/a
 
      2nd Sep 2003
I have created a .dll file which creates a form with a
picturebox and a bitmap in it.I create an instance of the
dll from a project but I get an exception FileNotFound
My code is:

this.bitmap = new Bitmap(the path along with the bitmap
file);
pictureBox1.Image = bitmap;

Actually, I have added the bitmap file in the dll project,
not the application project that I use to test the dll,
and I select Build Action:Content.

Thanks
 
Reply With Quote
 
 
 
 
Suresh Venkatraman
Guest
Posts: n/a
 
      3rd Sep 2003
Are you embedding the bitmap into the dll? If so then you may have to use
Assembly.GetManifestResourceStream to extract the bitmap.

--------------------
-Suresh Venkatraman [msft]

This posting is provided "AS IS" with no warranties, and confers no rights
--------------------
| Content-Class: urn:content-classes:message
| From: "Aris" <(E-Mail Removed)>
| Sender: "Aris" <(E-Mail Removed)>
| Subject: Bitmap problem
| Date: Tue, 2 Sep 2003 15:44:30 -0700
| Lines: 14
| Message-ID: <064101c371a3$c5ce85c0$(E-Mail Removed)>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Thread-Index: AcNxo8XOc+G+DOkzToSGNUf+bWv0iA==
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Newsgroups: microsoft.public.dotnet.framework.compactframework
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.compactframework:32568
| NNTP-Posting-Host: TK2MSFTNGXA09 10.40.1.161
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
|
| I have created a .dll file which creates a form with a
| picturebox and a bitmap in it.I create an instance of the
| dll from a project but I get an exception FileNotFound
| My code is:
|
| this.bitmap = new Bitmap(the path along with the bitmap
| file);
| pictureBox1.Image = bitmap;
|
| Actually, I have added the bitmap file in the dll project,
| not the application project that I use to test the dll,
| and I select Build Action:Content.
|
| Thanks
|

--------------------
-Suresh Venkatraman [msft]

This posting is provided "AS IS" with no warranties, and confers no rights

 
Reply With Quote
 
Aris
Guest
Posts: n/a
 
      3rd Sep 2003
Do you mean to select "Embedded Resource" as build action
in the dll project and add
Assembly.GetManifestResourceStream to the application
project?

>-----Original Message-----
>Are you embedding the bitmap into the dll? If so then you

may have to use
>Assembly.GetManifestResourceStream to extract the bitmap.
>
>--------------------
>-Suresh Venkatraman [msft]
>
>This posting is provided "AS IS" with no warranties, and

confers no rights
>--------------------
>| Content-Class: urn:content-classes:message
>| From: "Aris" <(E-Mail Removed)>
>| Sender: "Aris" <(E-Mail Removed)>
>| Subject: Bitmap problem
>| Date: Tue, 2 Sep 2003 15:44:30 -0700
>| Lines: 14
>| Message-ID: <064101c371a3$c5ce85c0$(E-Mail Removed)>
>| MIME-Version: 1.0
>| Content-Type: text/plain;
>| charset="iso-8859-1"
>| Content-Transfer-Encoding: 7bit
>| X-Newsreader: Microsoft CDO for Windows 2000
>| Thread-Index: AcNxo8XOc+G+DOkzToSGNUf+bWv0iA==
>| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
>| Newsgroups:

microsoft.public.dotnet.framework.compactframework
>| Path: cpmsftngxa06.phx.gbl
>| Xref: cpmsftngxa06.phx.gbl
>microsoft.public.dotnet.framework.compactframework:32568
>| NNTP-Posting-Host: TK2MSFTNGXA09 10.40.1.161
>| X-Tomcat-NG:

microsoft.public.dotnet.framework.compactframework
>|
>| I have created a .dll file which creates a form with a
>| picturebox and a bitmap in it.I create an instance of

the
>| dll from a project but I get an exception FileNotFound
>| My code is:
>|
>| this.bitmap = new Bitmap(the path along with the bitmap
>| file);
>| pictureBox1.Image = bitmap;
>|
>| Actually, I have added the bitmap file in the dll

project,
>| not the application project that I use to test the dll,
>| and I select Build Action:Content.
>|
>| Thanks
>|
>
>--------------------
>-Suresh Venkatraman [msft]
>
>This posting is provided "AS IS" with no warranties, and

confers no rights
>
>.
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
'System.Drawing.Bitmap.Bitmap()' Error Fir5tSight Microsoft Dot NET 7 23rd Jun 2006 11:44 AM
copy a portion of a bitmap to another bitmap (via picturebox or other method) ? Mad Scientist Jr Microsoft VB .NET 2 31st Jan 2005 02:26 PM
Extract portion of a bitmap to display, not entire bitmap. Alex Gray Microsoft C# .NET 2 22nd Feb 2004 01:42 PM
Question on how to access bitmap: Public Function getBitmap() As Bitmap Michael Murphy Microsoft VB .NET 2 7th Oct 2003 01:54 PM
extract OLE bitmap from table and save as a bitmap file Brett Rawcliffe Microsoft Access 1 19th Jul 2003 03:42 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:15 AM.