Results 1 to 2 of 2

Thread: Use an Embedded Image?

  1. #1

    Thread Starter
    Hyperactive Member kleptos's Avatar
    Join Date
    Aug 2001
    Location
    The Dark Carnival
    Posts
    346

    Use an Embedded Image?

    I want to embed some images into my application, but i dont know how to use them? I want to fill a picturebox control with an imbedded image, but i cant figure it out. I can do this with no problem using icons, if i try to use the same code with an image i get an error.

    This Works:
    Code:
    nIcon.Icon = new Icon(GetType(),"custom.ico");
    This Doesnt:
    Code:
    pBox.Image = new Image(GetType(),"custom.bmp");
    
    /*
    Cannot create an instance of the abstract class or interface 'System.Drawing.Image'
    */
    ..::[kleptos]::..
    • Database Administrator (MSSQL 2000)
    • Application Developer (C#)
    • Web Developer (ASP.NET)


  2. #2
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    image is an abstract class so u cant create instances off it..try using bitmap
    \m/\m/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width