Hi folks,
I have a bit map that is created externally that I want to use as a background image for a button but I want the image to be resized to fill the button space no matter how big the button is. I am currently using the following for putting the image in the button, but the image is either cropped or repeated.
Does anybody have an idea how to do this correctly.
Thanks for any help
Dim strm As System.IO.Stream
strm = (Me.GetType.Assembly.GetManifestResourceStream("Project.ButtonStyle1.bmp"))
Me.BackgroundImage = New Bitmap(strm) CType(strm, System.Drawing.Bitmap)
me.Name = "ButtonStyle1"
Me.ImageAlign = ContentAlignment.MiddleCenter
Me.FlatStyle = FlatStyle.Standard
I have a bit map that is created externally that I want to use as a background image for a button but I want the image to be resized to fill the button space no matter how big the button is. I am currently using the following for putting the image in the button, but the image is either cropped or repeated.
Does anybody have an idea how to do this correctly.
Thanks for any help
Dim strm As System.IO.Stream
strm = (Me.GetType.Assembly.GetManifestResourceStream("Project.ButtonStyle1.bmp"))
Me.BackgroundImage = New Bitmap(strm) CType(strm, System.Drawing.Bitmap)
me.Name = "ButtonStyle1"
Me.ImageAlign = ContentAlignment.MiddleCenter
Me.FlatStyle = FlatStyle.Standard