Consulting

Results 1 to 6 of 6

Thread: Button Image

  1. #1

    Button Image

    I need to know the rules for images used for button on the MAC. My images look fine on PC, but then on MAC look awful - almost as if the pallette is only 10 colors. I'm saving as 24 bit .bmp. thanks,

  2. #2
    Knowledge Base Approver VBAX Master Oorang's Avatar
    Joined
    Jan 2007
    Posts
    1,135
    Location
    Hi DC,
    Welcome to the board I confess I know next to nothing about Mac, but until someone helps you out, you can work around this problem. Add an image control to your form. Set the special effect to raised. Set the button click event to perform the action you wish. To simulate the button animation use the mouse up & down events. See example code below.
    [VBA]Private Sub Image1_Click()
    VBA.Beep
    End Sub

    Private Sub Image1_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
    Me.Image1.SpecialEffect = fmSpecialEffectSunken
    End Sub

    Private Sub Image1_MouseUp(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
    Me.Image1.SpecialEffect = fmSpecialEffectRaised
    End Sub
    [/VBA]
    Cordially,
    Aaron



    Keep Our Board Clean!
    • Please Mark your thread "Solved" if you get an acceptable response (under thread tools).
    • Enclose your code in VBA tags then it will be formatted as per the VBIDE to improve readability.

  3. #3
    Oorange, thanks - but .SpecialEffect doesn't appear to be available in MAC.

  4. #4
    VBAX Mentor tpoynton's Avatar
    Joined
    Feb 2005
    Location
    Clinton, MA
    Posts
    399
    Location
    many limitations on the mac...I havent used pictures for buttons, but i've noticed that you cant even set colors for the button faces. Well, to be clearer, I havent tried setting button colors on the mac, but for projects developed in windows, button colors are not retained.

    I have found that VBA help in the mac does a fair job of pointing out when things are different, and workarounds if they exist.

  5. #5
    Mac Moderator VBAX Expert shades's Avatar
    Joined
    May 2004
    Location
    Kansas City, USA
    Posts
    638
    Location
    If you have it available, usually if you can get it to run on Excel 97 it will generally work on the Mac.

    Software: LibreOffice 3.3 on Mac OS X 10.6.5
    (retired Excel 2003 user, 3.28.2008 )
    Humanware: Older than dirt
    --------------------
    old, slow, and confused
    but at least I'm inconsistent!

    Rich

  6. #6
    Mac Moderator VBAX Expert shades's Avatar
    Joined
    May 2004
    Location
    Kansas City, USA
    Posts
    638
    Location
    Take a look Excel 97 Buttons by Dave Ritchie for more.

    Software: LibreOffice 3.3 on Mac OS X 10.6.5
    (retired Excel 2003 user, 3.28.2008 )
    Humanware: Older than dirt
    --------------------
    old, slow, and confused
    but at least I'm inconsistent!

    Rich

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •