none
Deployed image in button is off-center RRS feed

  • Question

  • I have a form built with VSTO 2010.  There is a button on the form with an image embedded in it (see the downward pointing button in the images below).  ImageAlign is set to MiddleCenter in the Properties panel for the button with the image embedded on it.

    The image is centered fine in the development machine:

    Microsoft Windows 7 Professional
    Service pack 1
    Microsoft Visual Studio 2010 Tools for Office Runtime (x86)
    Microsoft .NET Framework 4 Extended
    Microsoft .NET Framework 4 Client Profile
    Microsoft Office Home and Business 2010

    BUT the image is off-center in the deployment machine:

    Microsoft Windows Server 2008 Standard
    Service Pack 2
    Microsoft .NET Framework 4 Extended
    Microsoft .NET Framework 4 Client Profile
    Microsoft Office Home and Business 2010

    Does anyone know why this happens?  Do you know how I can fix it?  Thanks.




    • Edited by Screener Thursday, March 22, 2012 2:04 AM
    Thursday, March 22, 2012 2:01 AM

Answers

All replies

  • enable desktop experience on win2008 srv and turn on visual styles - will image look better then?
    Thursday, March 22, 2012 9:14 AM
  • Another option is to get rid of the button and just have a clickable image.

    Kind Regards, Rich ... http://greatcirclelearning.com

    Thursday, March 22, 2012 11:10 AM
  • The enable desktop experience was turned on, thank you for that thought.  The clickable image idea is a good one, but perhaps a little out of my range of capability right now.  In the process of searching out your answers, I happened upon the PictureBox control.  duh.  That works in my case.

    Thursday, March 22, 2012 11:52 AM
  • Yes the PictureBox is how you put an image on the form and it is then clickable.

    Kind Regards, Rich ... http://greatcirclelearning.com

    Thursday, March 22, 2012 11:59 AM