Results 1 to 13 of 13

Thread: CommandButton focus rectangle

  1. #1
    Guest

    Talking CommandButton focus rectangle

    I'm using a CommandButton with a graphical style.
    When the button has the focus, an ugly focus rectangle appears on it. Is there a way to remove it?

  2. #2
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    I don't know how.
    I use imageboxes as they load the images faster
    and with the stretch propety set to true them
    look very good. If you want a real button look
    you just buttonize your image.

    http://www10.ewebcity.com/dirtbagdog/main.htm

    all the buttons there are just images.
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  3. #3
    Guest
    The problem is that my button has the 'Button Face' constant for the BackColor property, and a graphical CommandButton lets you use a Mask color in order to draw the picture with a transparent background, I can't see any other way to do that.
    Not everybody has this gray color as a window color, and I want my app to look good anywhere.

  4. #4
    Hyperactive Member dsy5's Avatar
    Join Date
    Jul 2000
    Location
    Lockport, NY
    Posts
    362
    I build a lot of link buttons on Web pages using images (a text image at first, then a glowing text image on a mouseover).
    I get the same stupid focus rectangle after they're selected, but only with IE! (I'm using IE5).

    Netscape does not have this problem.

    I wonder if this is a Microsoft thing?
    Donald Sy - VB (ab)user

  5. #5
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    Have never played with that..interesting.

    How does it work?
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  6. #6
    Guest
    HeSaidJoe: The graphical CommandButton or the MouseOver?

  7. #7
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    the mask of the command button procedure

    do you paint the picture on or just load
    a picture and set the mask...
    I have no idea how you would use just the image
    but it sounds interesting.
    Transparant background on a picture button.

    do you have an example
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  8. #8
    Guest
    It's not complicated at all :
    Add a regular 'CommandButton' to your form.
    Set it's 'Style' property to '1 - Graphical'.
    Set the 'Picture' property to whatever picture you want.
    Set the 'MaskColor' property to whatever color you want to be transparent.
    And set the 'UseMaskColor' property to 'True'.

    That's all.
    Just make sure the RGB for the mask color is exactly the RGB of the color on your picture.

    Let me know.

  9. #9
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946
    thanks ScOrp...
    get back later....the wife is yanking my chain so I gotta get out of here.
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  10. #10
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    I still like image control over style 1 buttons. Here is an example of
    what it looks like. Mind you there was no effort to clean up the images etc
    as this was just a fly bye for a Demo

    all you need is to set the form background and the image.gif's background to the same
    and you have instant custome shapes.

    Wayne
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  11. #11
    Guest
    That's not the problem...
    The default window backcolor varies from user to user, thus, I can't make a background for my image that will fit to all users. I need a way to blit with transparency.

  12. #12
    Guest
    well, if the image you have is 32x32 or less(some icon editors allow 48x48) you can make it into an icon with a transparent background.. then use an image control to display it...

  13. #13
    Guest
    Thanks denniswrenn! It worked!

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