Results 1 to 3 of 3

Thread: overrides "image" member property of picturebox?

  1. #1

    Thread Starter
    Registered User
    Join Date
    Oct 2003
    Posts
    6

    overrides "image" member property of picturebox?

    hey ,

    I need to override "Image" member property of the normal picturebox , thus it accepts "Icon" types ? Do I have to make my own usercontrol or inherit from Picturebox ? I know I can convert icons to images but this would be on the image quality .

    please help me , I badly need help .suck for 3 days and can't seem to find a good link that asnwer my question

    Thanks so mcuh

  2. #2
    Frenzied Member dynamic_sysop's Avatar
    Join Date
    Jun 2003
    Location
    Ashby, Leicestershire.
    Posts
    1,142
    i cant understand why you cant get an icon in to a picturebox, this is an example in vb.net ...
    VB Code:
    1. PictureBox1.Image = Image.FromFile("C:\App.ico")
    2. '/// from an exsisting file ^^^
    3. '///Or from an embedded file in your app .....
    4. Dim streamPath As String = Application.ProductName & ".App.ico" '/// path to embedded icon file.
    5. PictureBox1.Image = Image.FromStream(Me.GetType.Assembly.GetManifestResourceStream(streamPath))
    or in C# ....
    VB Code:
    1. pictureBox1.Image= Image.FromFile("C:\App.ico");
    2.  
    3. path=Application.ProductName + ".App.ico";
    4. pictureBox1.Image=Image.FromStream(System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream(path));
    ~
    if a post is resolved, please mark it as [Resolved]
    protected string get_Signature(){return Censored;}
    [vbcode][php] please use code tags when posting any code [/php][/vbcode]

  3. #3

    Thread Starter
    Registered User
    Join Date
    Oct 2003
    Posts
    6
    isn't my question clear !! i know i can use that plus different ways but i'm getting icons , do some processing then produce icon object . if converted to anyother object , it shows crap so , i need to load them in the picturebox as icon .

    thanks for your reply.

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