Results 1 to 10 of 10

Thread: e.Graphics.DrawImage is fading stretched image

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2006
    Posts
    268

    e.Graphics.DrawImage is fading stretched image

    This is in a class, the class inherits Panel.
    VB.net Code:
    1. Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs)
    2.         e.Graphics.DrawImage(_BackgroundImage, 0, 0, 300, 50)
    3.         MyBase.OnPaint(e)
    4.     End Sub

    _BackgroundImage is set to a PNG image, 1 px wide x 50 px tall.

    The goal is to have this image stretched to 300x50

    Whenever I do it, it works, but it fades the image from left to right, so that at Left = 0, the image is solid, but at Left = 300, the image is transparent.



    Thanks.
    Last edited by GregSenne; Dec 13th, 2010 at 11:20 AM.

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