Image Doesn't Align Properly

  • Thread starter Thread starter TC
  • Start date Start date
T

TC

I'm trying to create a Label control with an image flush against the
left edge. For some reason, however, VB always puts 2 white pixels
between the left edge and the start of the image. As far as I can
figure, the problem seems to be with using MiddleLeft for the
ImageAlign property.

Can anyone offer advice on how to fix or workaround this problem?

Here is a snip of the relevant code:

.Image = New Drawing.Bitmap("TitleImage.bmp")
.ImageAlign = Drawing.ContentAlignment.MiddleLeft
.BorderStyle = BorderStyle.FixedSingle


-TC
 
TC said:
I'm trying to create a Label control with an image flush against the
left edge. For some reason, however, VB always puts 2 white pixels
between the left edge and the start of the image. As far as I can
figure, the problem seems to be with using MiddleLeft for the
ImageAlign property.

Can anyone offer advice on how to fix or workaround this problem?

Here is a snip of the relevant code:

.Image = New Drawing.Bitmap("TitleImage.bmp")
.ImageAlign = Drawing.ContentAlignment.MiddleLeft
.BorderStyle = BorderStyle.FixedSingle


The space between is "by design". To get it differnt, you can paint the
image on your own in the Paint event.


Armin
 
Back
Top